Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Busty Sinclair
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I used the onchange event instead as follows:

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic