• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic