Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts combobox event

 
selumiel eliude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
selumiel eliude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
i appreciate it!
 
selumiel eliude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u very much i appreciate ur help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic