File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Dynamic Select Lists Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamic Select Lists" Watch "Dynamic Select Lists" New topic
Author

Dynamic Select Lists

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
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 ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41821
    
  62
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 ]

Ping & DNS - my free Android networking tools app
Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
hi
Do you know how to do it using scripts ? Im not that good with scripting .Can you help me with it?
Anil
Ram kanana
Ranch Hand

Joined: Apr 13, 2006
Posts: 34
it is possible by using java script by writing innerHTML code
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

Moved to the HTML/Javascript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Select Lists