solarisuser Posted January 31, 2008 Share Posted January 31, 2008 Hi All, I am using AJAX in a form so when someone enters a country, it populates the fields with the population, etc. This works fine in text fields. Then I am using a JS script that links two dropdown menus, so when you select "A" in the first dropdown, it does a mysql query and shows only the results relating to A in the second dropdown. This works fine when clicking on it. The problem: When I type in a country, AJAX fills in the first dropdown menu just fine. However the second dropdown menu does not update. When I click on the first dropdown menu, then it works. I would like to know how can I make the second dropdown update when AJAX fills in the first dropdown. Right now, I'm using onchange="update_second_dropdown();" on my first dropdown.... any suggestions would be a big help! Thanks! Quote Link to comment Share on other sites More sharing options...
priti Posted February 1, 2008 Share Posted February 1, 2008 exactly how many dropdown there in your three or two got confused give an dummy example to explain your problem. dropdown1:country dropdown3:population when you click country you said it work fine it populate the population dropdown right??then where problem exists?? Quote Link to comment Share on other sites More sharing options...
pdkv2 Posted February 1, 2008 Share Posted February 1, 2008 Also Call update_second_dropdown(); function when the the first drop down gets populated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.