This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes about html:cancel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "about html:cancel" Watch "about html:cancel" New topic

about html:cancel

Abhay Ram

Joined: Dec 14, 2010
Posts: 7
hi everybody
i using these syntax but its not working properly
i tried the following code

1)<html:cancel onclick='CancelForm("<bean:write name="employeeLeave" property="employeeCode"/>");' ></html:cancel>
2)<html:cancel onclick="CancelForm('<bean:write name="employeeLeave" property="employeeCode"/>');"></html:cancel>

3)<html:cancel onclick="CancelForm("<bean:write name='employeeLeave' property='employeeCode'/>");" ></html:cancel>

i tried all that but still not working can you tell me why??
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60765

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Stefan Evans

Joined: Jul 06, 2005
Posts: 1016
You cannot have custom tags as part of an attribute to another custom tag.
ie it is illegal to have the <bean:write> tag where you have it, because it is part of the html:cancel's onclick attribute.
The following would work I think:

wood burning stoves
subject: about html:cancel
Similar Threads
Equal Symbol Expected?
URL Encoding in "a href"
Unable to insert a bean:write value that has a space
enable/disable textbox
Iterate ArrayList and call javascript menthod according to it's value on JSP