File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes onClick invalid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "onClick invalid" Watch "onClick invalid" New topic

onClick invalid

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137

I was not sure where to post the topic, here or in the HTML & javascript section.

It has to do HTML:submit tags.

I wanted the user to confirm whether they wanted to delete or not.

< html:submit property="submit" value="Delete" onClick&="return confirm('Are you sure you want to delete this Notice?\rIf you press OK, the Notice will be removed from the system.');" /<

Could not compile the page. got the following error
Attribute onClick invalid according to the specified TLD


Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
For some reason, the "onClick" attribute is "onclick" for struts html tags. The "c" must be lower case. Also, I'm not sure if this is a typo, but you have an unwanted"&" before the equal sign.

Consultant, Sima Solutions
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Thanks Merrill

It was my mistake, i just copied and pasted it without realising about the 'C'. '&' was a typo.


subject: onClick invalid
Similar Threads
Delete Confirmation window
problem with confirm()
2 jsp buttons
problem with action
Handling Multiple Buttons in Struts