This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes displaying values in same jsp after user selects value in combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "displaying values in same jsp after user selects value in combo box" Watch "displaying values in same jsp after user selects value in combo box" New topic
Author

displaying values in same jsp after user selects value in combo box

alex pandiyan
Greenhorn

Joined: Aug 25, 2004
Posts: 10
Hi all,i have a situation,where i have three comboboxes,based on first combo,the second combo has to be loaded and another combo(static combo).
Based on user selection and if he clicks submit button,i have to query and display samples on the jsp page.
Any sample links or sample code for this would be useful.
Thanks in advance
Chandra Sekhar
Ranch Hand

Joined: Sep 26, 2003
Posts: 90
"i have three comboboxes,based on first combo,the second combo has to be loaded and another combo(static combo)."
============================================================================
You can do this by having some client-side javascript function that you list in the first combo box's "onclick" or "onselect", to which you pass in both the selected item and the ID of the second combo box. You then have the javascript function populate the contents of the second combo box.

Rgds
Chandrasekhar S.
SCJP


"Luck is when opportunity meets preparation"
alex pandiyan
Greenhorn

Joined: Aug 25, 2004
Posts: 10
chandru,
thanks for the reply.
But,any javascript code snippet regarding the same would do a lot of good.
Chandra Sekhar
Ranch Hand

Joined: Sep 26, 2003
Posts: 90
do a google search u'll find a lot of sites which give cut and paste java script code snipplets

check this..
http://www.javascriptkit.com/script/cut183.shtml

hope u'll find this useful

Chandrasekhar S.
SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: displaying values in same jsp after user selects value in combo box
 
Similar Threads
Recursive post to same jsp
jsp dynamic combo box
combo boxes and iterator
dependent combo
How to load data in a combo based on user selection on another combo