You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/07/14 11:14:52 UTC
DO NOT REPLY [Bug 21560] New: -
JavascriptValidatorTag creates invalida javascript method name when validating using action path in formName
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21560
JavascriptValidatorTag creates invalida javascript method name when validating using action path in formName
Summary: JavascriptValidatorTag creates invalida javascript
method name when validating using action path in
formName
Product: Struts
Version: 1.1 RC1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: navidbazari@hotmail.com
When using DynaValidatorActionForm and if you want to enable both javascript
and server-side validation using the same validation definition then you need
to use the action-mapping path as the formName attribute of the html:javascript
tag. Because the default method name given to the form's javascript validator
the is 'validate' + formName the forward slash causes an error in the page.
I've resolved this in my version of the code by replacing the forward slash
with underscore and viceversa when refering to the javascript validation method
in the form's onclick.
e.g.
<html:form action="newClaimInitial.do" onsubmit="if (!
validate_newClaimInitial(this)) return false;">
<html:javascript formName="/newClaimInitial"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org