Refreshing a dropdown list when selecting another dropdown list. |
[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/lo...requesting If you liek it, I can share the code ![]() hey mate, I like it ![]()
[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
[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 |
Welcome Guest, Not a member yet? Register Sign In |