This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes html:select : how to/ can u use onselect()?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select : how to/ can u use onselect()??" Watch "html:select : how to/ can u use onselect()??" New topic
Author

html:select : how to/ can u use onselect()??

Busty Sinclair
Greenhorn

Joined: Jun 06, 2002
Posts: 23
Hi there
I am trying to dynamically submit a form when something is selected in a dropdown menu.
I see from the Struts API that the html:select tag inherits onselect() from the basehandler() but I cant seem to use it, it tells me that the method is not defined in the DTD.
I am using the "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"
Any help would be appreciated
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
had the same problem a while back, and because we extended "org.apache.struts.taglib.html.TextTag" we simply included the output we wanted in the doStartTag method, but you can also just add it to your jsp, anyhat, what you can do, not saying its the best solution, but you can escape it as follows ,
"\" onselect=\"doWhateverOnSelect");

you can also add the attribute to your new Tag
[ June 17, 2003: Message edited by: Ta Ri Ki Sun ]
Busty Sinclair
Greenhorn

Joined: Jun 06, 2002
Posts: 23
Hi,
I used the onchange event instead as follows:

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:select : how to/ can u use onselect()??
 
Similar Threads
onSelect attribute for html:select tag
html:select
local struts-config_1_1.dtd
Struts Dojo autocompleter
Is onSelect supported by html:select