DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31509>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31509 html:javascript tag doesn't work right with jsFunctionName set [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 2004-10-03 07:04 ------- The jsFunctionName relates to the functions called by the scripts rather than whats in generated form's validation method. You're right in that it uses the method name - you need to change your custom validator so it doesn't have the same method name as the required validator. You can do ith either with or without a jsFunctionName.... 1) Specifying a jsFunctionName ============================== <validator name="required_fullmsg" classname="org.apache.struts.validator.FieldChecks" method="validateRequiredFullMsg" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest" msg="errors.detail" jsFunction="org.swapsimple.javascript.validateRequiredFullMsg" jsFunctionName="RequiredFullMsgValidations" /> In your script.... function validateRequiredFullMsg(form) { oRequired = eval('new ' + formName.value + '_RequiredFullMsgValidations ()'); etc. etc. } 2) Without a jsFunctionName =========================== <validator name="required_fullmsg" classname="org.apache.struts.validator.FieldChecks" method="validateRequiredFullMsg" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest" msg="errors.detail" jsFunction="org.swapsimple.javascript.validateRequiredFullMsg" /> In your script.... function validateRequiredFullMsg(form) { oRequired = eval('new ' + formName.value + '_required_fullmsg()'); etc. etc. } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]