CodeIgniter Forums
dynamic dropdown box - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: dynamic dropdown box (/thread-35128.html)



dynamic dropdown box - El Forum - 10-19-2010

[eluser]snowstar[/eluser]
Hi all,

i've been using ci for awhile now. This is first time i havent found what i've been looking for via google or the forums so i decided to make a post.

I'm currently working on a dynamic invoice but i'm stuck in one area.

I'm trying to make a drop down box (which select values contain populated info in db) on select of one option will auto complete two other input fields with information associated with that value i.e user selects product name and product's description and price are fulled out in the other two input fields.

Apart from the above, i've got the rest working.

Could some one point me in the right direction? i think this could be achieved with Ajax how-ever i havent touched ajax before.

Much appreciated


dynamic dropdown box - El Forum - 10-19-2010

[eluser]InsiteFX[/eluser]
You can read up on jQuery here.

jQuery

jQuery UI

InsiteFX


dynamic dropdown box - El Forum - 10-19-2010

[eluser]umefarooq[/eluser]
yes ajax is the key, will help you to solve you problem its really easy use just use jquery to do this all if you dont know about jquery also just have look on these tutorials will help you

http://net.tutsplus.com/articles/web-roundups/jquery-for-absolute-beginners-video-series/

if you want to do really quick check jquery change event from jquery doc

http://api.jquery.com/change/

jquery post doc

http://api.jquery.com/jQuery.post/

just put post in jquery change function will work for you if you find any problem just post here


dynamic dropdown box - El Forum - 10-20-2010

[eluser]CroNiX[/eluser]
google "jquery dependent select box"