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 Struts and the fly likes struts combobox event 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 » Frameworks » Struts
Reply Bookmark "struts combobox event" Watch "struts combobox event" New topic
Author

struts combobox event

selumiel eliude
Greenhorn

Joined: Apr 05, 2005
Posts: 9
hi
i created i combobox in struts that displays the information from the database. now what i want to do is if i select a name in the combobox it displays the details of that specific person on the other fields of the jsp page. i tried some events like : onchange, onfocus, onclick but it doesn�t do anything. anyone knows what i�m doing wrong? please let me know what do i have to do.
thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The approach I'd suggest is to have the onchange event for the select tag submit the form, and have the action class look up the user name and forward back to the JSP with the information for that user.

For a form named MyForm, the following would work:

onchange="document.MyForm.submit()"

Make sure the onchange event is for the <html:select> tag, not the <html ptions> tag.


Merrill
Consultant, Sima Solutions
selumiel eliude
Greenhorn

Joined: Apr 05, 2005
Posts: 9
thanks
i appreciate it!
selumiel eliude
Greenhorn

Joined: Apr 05, 2005
Posts: 9
Thank u very much i appreciate ur help
 
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: struts combobox event
 
Similar Threads
Calendar Popup via JCombobox
populate a combobox
Enabling/Disabling buttons in JSP
broken color display in Java 5
JTable Cell Editor[JComboBox] Problem