• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 720
  • Last Modified:

Insert a onClick event in a Strut's button

Is possible insert a OnClick event javaScript on an button created by Strut's tag?
Something like this:

<html:submit property="metodo" onClick="javascript:jumpToInsert('../inputDB.do?method=insert);">
     <bean:message key="button.search"/>
</html:submit>

Thanks!
0
MissBrucoMela
Asked:
MissBrucoMela
  • 3
1 Solution
 
TimYatesCommented:
yes

like that :)
0
 
MissBrucoMelaAuthor Commented:
No, It does not works!
I have a message error:
"Attribute : onClick is not a valid attribute name"
0
 
TimYatesCommented:
Sorry:

<html:submit property="metodo" onclick="javascript:jumpToInsert('../inputDB.do?method=insert);">
     <bean:message key="button.search"/>
</html:submit>

onclick NOT onClick
0
 
TimYatesCommented:
*sniff* only a B grade?  What did I do wrong?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now