• 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

Dynamic Select Lists

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai
Im doin a project in JSP.I have 2 drop downs , the second one should be populated using the value from the firsty . Both the drop downs are on the same page how do i get the value of the first drop down.
Anil





[BPSouther: Removed "Urgent from the subject line"]
[ November 01, 2006: Message edited by: Ben Souther ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either you can submit the page once a selection is made in the frist dropdown (and then re-generate the page with the appropriate values), or use JavaScript to populate the second dropdown whenever a selection is made in the first. The "onChange" handler can be used for this.

By the way, in the future please use a descriptive subject line - "Need Help Urgent" does not convey anything about your problem, and most problems are urgent, so it's better to not mention that.
[ November 01, 2006: Message edited by: Ulf Dittmer ]
 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Do you know how to do it using scripts ? Im not that good with scripting .Can you help me with it?
Anil
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is possible by using java script by writing innerHTML code
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the HTML/Javascript forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic