I have the same situation that yours. My solution is to save the static part of validator in an static .js file

<script type="text/javascript" src="/scripts/validator.js"></script>

...and replace all ocurrences of
   var formName = form.getAttributeNode("name");
with
   var formName = form.getAttributeNode("id");


My previous setup was
<script type="text/javascript" src="<c:url value="/scripts/validator.jsp"/>"> </script>


Inside validator.jsp there was:

<%@ page language="java" contentType="javascript/x-javascript" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
<html:javascript dynamicJavascript="false" staticJavascript="true"/>

Like this you can save the javascript functions, pointing your browser to http://host/context/scripts/validador.jsp


Niall Pemberton escribió:

Its a bug in Version 1.2.7 caused by the changes for Bug 34027. It has been
reported in Bug 35127 and a fix has been applied

I have upated the upgrade notes on the wiki to make a note of this:

http://wiki.apache.org/struts/StrutsUpgradeNotes124to127

Niall

----- Original Message ----- From: "Eduardo José Hernández Cisneros" <[EMAIL PROTECTED]>
Sent: Friday, July 01, 2005 5:04 PM


Hi everybody,

   I recently upgrade my struts libraries to 1.2.7 from 1.2.4. I am using
the <html:xhtml/>  tag with:

<html:form action="saveUser" focus="name" styleId="productTypeForm"
   onsubmit="return validateProductTypeForm(this)">
.

</html:form>

In 1.2.4 version the html:form tag renders correctly the form name
attribute, but when a I changed to 1.2.7 the form name disappeared and
this
causing trouble with a javascript client-side validation that I am using.
The funny part is that when I remove <html:xhtml/> tag with 1.2.7 version
the form name appears again.

Am I using wrongly the <html:xhtml/>  tag or could it be a bug?

Thank you for your time.

--Eduardo



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to