Solved

Insert a onClick event in a Strut's button

Posted on 2004-04-23
4
712 Views
Last Modified: 2010-07-27
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
Comment
Question by:MissBrucoMela
  • 3
4 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 10897977
yes

like that :)
0
 

Author Comment

by:MissBrucoMela
ID: 10899491
No, It does not works!
I have a message error:
"Attribute : onClick is not a valid attribute name"
0
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 10899552
Sorry:

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

onclick NOT onClick
0
 
LVL 35

Expert Comment

by:TimYates
ID: 10900170
*sniff* only a B grade?  What did I do wrong?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSP Popup page 2 131
maven project in eclipse 11 60
Reading data  from excel sheet and displaying 1 89
countXY challenge 28 160
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question