aspose file tools
The moose likes JSP and the fly likes drop down menus Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "drop down menus" Watch "drop down menus" New topic
Author

drop down menus

ashwin venkat
Greenhorn

Joined: Mar 03, 2012
Posts: 8
here's my problem!!
i have 2 drop down menus.. based on the selection in the 1st drop down menu.. the 2nd drop down menu has to be populated accordingly! how do i do this ???
ex: "drop down1" has values 1,2,3,4,5.
"drop down2" initially holds values a,b,c,d,e,f
if i select 3 in "drop down1".... only c,d,f (say) should be available for selection in " drop down 2"
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 503

You can use onchange event.
On change of drop down1, based on its value, populate the options for dropdown2.
You can use AJAX to get these options for dropdown2 by passing the dropdown1 value..


Regards, Prasad
SCJP 5 (93%)
ashwin venkat
Greenhorn

Joined: Mar 03, 2012
Posts: 8
Prasad Krishnegowda wrote:You can use onchange event.
On change of drop down1, based on its value, populate the options for dropdown2.
You can use AJAX to get these options for dropdown2 by passing the dropdown1 value..


I'll try it out.. thanks !
 
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: drop down menus
 
Similar Threads
Help with Send Email on submit
Menu with multiple selection?
getting values to table using ajax and servlet
ajax dynamic combo
dropdown selection in Struts2