This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Dropdown problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Dropdown problem" Watch "Dropdown problem" New topic
Author

Dropdown problem

Nee Kat
Ranch Hand

Joined: Jan 27, 2004
Posts: 37
I have to create a dropdown box based on a selection in another drop down on the same page.

I mean to say if a dropdown A has a selection "1" then only dropdown B should show otherwise not.
Disabling B would also work and enable it only when dropdown A has a selection "1".

Any ideas how to do this..like which functions should be used. Code would be appreciated.
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1049
Hi Nee,
you could use the onchange-event to set the display from "none" to "inline" if the value is 1.


hth cb
[ October 19, 2005: Message edited by: Chris Baron ]
Nee Kat
Ranch Hand

Joined: Jan 27, 2004
Posts: 37
Thanks for the code Chris. It works great.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Dropdown problem
 
Similar Threads
Want to add a dropdown Jlist
dropdown selection in Struts2
JSF Dynamic Select Value Error
Getting One Dropdown Menu Selection to Affect the Values of a Second Dropdown Menu
Dropdown selection