This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

implementing dynamism dropdown box  RSS feed

 
Preetham
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey all,
I am having three dropdowns in my html page i.e. country, state and city. The data in the drop boxes change accoding to the value selected in the box above. If a country A is selected, the state dropdown has values x,y and z. | ||ly if country B is selected the state dropdown has values c,d and e. For each change i do not want to hit the database. Is there a way to get all the data when the page is loaded and manipulate the data within the page as and when the value selected in the dropdown changes.
Thanks,
Preetham.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Preetham",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to this wonderful solution from Frank. But it will hit db each time you change state. If your data is going to be huge, it is wise to follow Frank's solution.
regds
maha anna http://www.javaranch.com/ubb/Forum7/HTML/001041.html
[This message has been edited by maha anna (edited May 31, 2001).]
 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If your data is not going to be huge, you can use client side javascript.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!