Hi, I'm new to Struts. It's convenient Struts provides validation for integer, required, etc. But I've problem with the range validation in Struts 1.1. Javascript error. Saying something about "intRange" error in javascript. Any help apreciated.
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11945
posted
0
Hi,
It would probably help if you'd post the full error message and some relevant code snippets (the validation config file).
I just wonder why the Struts validation will lead to JavaScript errors. As if you have configured Struts well, when errors encountered after calling the method validate(), the original page will be shown.
Could you post the validate() method, as well as the validate.xml?
When I enter an invalid range and try to submit the form, the error uccur. The non-javascript error msg <html:errors/> shows the right error msg though.
The javascript error msg in IE: 'intRange' is undefined
The javascript error msg in Opera: Event thread: onsubmit Error: name: ReferenceError message: Statement on line 479: Reference to undefined variable: No such variable 'intRange'
I think it has something to do with the line "oRange = new intRange();" in validator-rules.xml