The circumstance is: 1) One JSP with only one <form> tag can be submitted to two different actions, and the two actions have different validation rules. 2) In struts-config.xml, the two actions shares same form bean, and the form bean's class is DynaValidatorActionForm. 3) In validation.xml, two forms are defined for the two actions respectively. 4) In JSP, the <html:javascript> tag is called twice with two actions as the formName respectively, i.e.
<html:javascript formName='/action1' method='validateForm1'/> <html:javascript formName='/action2' method='validateForm2'/> The intention is to call validateForm1() or validateForm2() respectively when submitting the page to different actions. However, now the problem is, JavaScript function for 'required' validator generated by the tag will use the [FormBean Name]_required as the name, and thus two functions with same name are generated in such case. Actually not only the function for required validator, all functions are duplicated. And in IE, the latter function will overwrite the former and thus my idea can't work. Can somebody help? Thank you! I'm using struts 1.3.8. -- View this message in context: http://www.nabble.com/%3Chtml%3Ajavascript%3E-tag-generate-two-JavaScript-functions-with-same-name-tp14500278p14500278.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]