This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Adding blockID into select box from database by getting locationID from another select box

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am doing my project in struts framework. My problem is that in one of my jsp page i have three select box for locationID , blockID and classID.I am adding the locationId dynamically from the database when the page loads for first time. Now my requirement is that when the user selects the location id then all the blockIDs under that locationID should be added into the blockID select box and after selecting a blockID the respective classID should be added into the classID select box.
Hope that you understand my problem so, please help me.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need JavaScript, and possibly Ajax if you want to do it dynamically without a page refresh. Moving to HTML/JavaScript forum.
 
nishant kumarmca
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please give me the coding to implement it.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are NotACodeMill

Start with a basic tutorial on Ajax. If you were to use a library such as jQuery it would be super simple to do.

Eric

 
nishant kumarmca
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry but i don't mean the whole code you can give me some sample code also.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you search the web for things like "dependent list box" or "linked list boxes" etc. you'll come up with a *lot* of examples; if you throw in the word "ajax" it'll cover the Ajax usecases as well.

If you have specific questions we're happy to help out--just show us what you're having a problem with. When I'm trying to solve a problem the first thing I do is try to decompose it into a lot of little problems.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!