Hi, I downoaded, latest nightly build which was on 1st of June... and it seems its not working.. it gives some other javascript error. function validateRequired(form) { var isValid = true; var focusField = null; var i = 0; var fields = new Array(); var formName = form.getAttributeNode("name"); //error is at this line.... oRequired = eval('new ' + formName.value + '_required()'); Can u tell me which version did u download.?? I need to finish of this. Regards. Guna -----Original Message----- From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no] Sent: Friday, July 02, 2004 3:22 PM To: user@struts.apache.org Subject: SV: Javascript error in struts validator. Hi I had the same problem - I think it was a mix of old and new struts components. What I did was get the latest nightly build, and replace everything. After that it all went away. Hermod -----Opprinnelig melding----- Fra: Kote, Nijaguna Sangankal [mailto:nijaguna-sangankal.kote@hp.com] Sendt: 2. juli 2004 10:58 Til: Struts Users Mailing List Emne: RE: Javascript error in struts validator. Hi Hermod, Thanks for the reply and the suggestion, I should upgrade only the validator ?? Or entire struts?? Regards/Guna -----Original Message----- From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no] Sent: Friday, July 02, 2004 2:14 PM To: user@struts.apache.org Subject: SV: Javascript error in struts validator. Hi If you look at jsp (view-source) you will probably notice that the jscript method (required) has been prefixed with the formname. Upgrade to the latest build. This was an issue with validator. Hermod -----Opprinnelig melding----- Fra: Kote, Nijaguna Sangankal [mailto:nijaguna-sangankal.kote@hp.com] Sendt: 2. juli 2004 08:38 Til: user@struts.apache.org Emne: Javascript error in struts validator. Hi All, I had posted this question, but got now answer. Please give me some hints on this. I am getting javascript error when I click on submit to validate my form. It's a simple login page with username and password. here is the code for login.jsp <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <% response.setHeader("pragma", "no-cache"); response.setHeader("Cache-control", "no-cache, no-store"); response.setHeader("Expires", "0"); %> <bean:message key="title.login"/> - This is how I am including the Javascript for validation. ........................................... Rest body code goes here. This is my validation.xml file
And validation-rules.xml file here is the error. for (x in oRequired) { var field = form[oRequired[x][0]]; if (field.type == 'text' || field.type == 'textarea' || field.type == 'file' || field.type == 'select-one' || field.type == 'radio' || field.type == 'password') { .............................. Rest Now when I load my jsp, struts generates javascript with validateLoginForm( document.loginForm )mehtod. But, when I click on submit button. I get javascript error saying "required is undefined" and it points to the above bold line in Validation-rules.xml file. I am not able to figure out why, any ideas or hints on this would help me a lot. Thanks Guna * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that DnB NOR cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org