GeeCON Prague 2014*
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


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
 
Don't get me started about those stupid light bulbs.
 
subject: html:select : how to/ can u use onselect()??