• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 725
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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