I have stored the names of the cities of 3 countries in my database.
Eg:-USA:-Newyork,Losangeles,washington
England :-London, Lords
India :-NewDelhi,Bombay,Calcutta
I will display name of all countries(USA,England,India) in first drop down box.
I want ASP code for the following.
My question is " I have 2 drop down boxes called country and city.
So when I select USA in firstdrop down box, then all the cities of
USA saved in my database should be displayed in second drop down box.
Similarly when I select England."
My question is " I have 2 drop down boxes called country and city.
So when I select USA in firstdrop down box, then all the cities of
USA saved in my database should be displayed in second drop down box.
Similarly when I select England."
You cannot accomplish this in ASP unless you're planning to submit the country name to the server so that ASP can build the content of the second dropdown box and send it back to the client. If you wanted the second dropdown box to be populated automatically on the client side, then you really need to ask this question in the JavaScript forum. All ASP can do, in that case, is provide the data in JavaScript data arrays and, then, let JavaScript pick and chose what it wants to display when the time comes.
Bookmarks