November 20, 201213 yr Hello there, I have a website where info of registered member from various countries and states are collected. On my search form, I have 3 fields; Country, State and Sex. I listed all the countries of the world in my search (as a dropdown), but the state field is empty. Want i want is that once a visitor select a country, i want only the states of that country which registered members have are in my database to be pulled into the state field, instead of all the state of that country. Eg 3 members from USA are from New York, New Jersey and Georgia. On selecting USA in the country dropdown, only these 3 state should appear under the state insteadt of the 50 states in america. Pls help. Thanks adsegzy
November 20, 201213 yr Author Hello there, I have a website where info of registered member from various countries and states are collected. On my search form, I have 3 fields; Country, State and Sex. I listed all the countries of the world in my search (as a dropdown), but the state field is empty. Want i want is that once a visitor select a country, i want only the states of that country which registered members have are in my database to be pulled into the state field, instead of all the state of that country. Eg 3 members from USA are from New York, New Jersey and Georgia. On selecting USA in the country dropdown, only these 3 state should appear under the state insteadt of the 50 states in america. Pls help. Thanks adsegzy
November 20, 201213 yr one way i think may work for you is to use Jquery onchange http://api.jquery.com/change/ from there you can use Jquery Ajax to post the drop down value to another file containing your select query to fetch the correct states to populate your select drop down options http://api.jquery.com/jQuery.post/ hope it helps
Create an account or sign in to comment