![]() |
Refreshing a dropdown list when selecting another dropdown list. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Refreshing a dropdown list when selecting another dropdown list. (/showthread.php?tid=10906) |
Refreshing a dropdown list when selecting another dropdown list. - El Forum - 11-14-2009 [eluser]Bui Duc Long[/eluser] [quote author="hugle" date="1258065297"]hi, I have done something similar you are asking, using CI and jQuery, you can take a look here: http://demo3.invista.lt/search/page/1/loans/giving_and_requesting If you liek it, I can share the code ![]() hey mate, I like it ![]() Refreshing a dropdown list when selecting another dropdown list. - El Forum - 11-17-2009 [eluser]doob[/eluser] Maybe this can help you. View 1 Code: <select name="state" id="selectstate"> jQuery Code: $("#selectstate").bind("change",function(){ Controller Code: <?php Model Code: <?php View: ajax/city_list.php Code: <select name="city"> DB-table: cities Code: id state_id city_name Refreshing a dropdown list when selecting another dropdown list. - El Forum - 12-04-2009 [eluser]alberta[/eluser] Hi, I have used the above code and it works fine. I have used it in form but problem is that when form is submitted, value returned by second drop down menu i.e filtered city is empty. Where is the problem ? Thanks |