nickw
Newbie
Posts: 1
Registered: 12/20/2004
Member Is Offline
|
| posted on 12/21/2004 at 09:25 AM |
|
|
Javascript Errors (Internet Explorer 6)
Hello,
I have implimented the free version of Tigra Form Validator into a website I have created. This works perfectly in Mozilla Firefox v1pr and Netscape
Navigator 7.2, however in Internet Explorer 6, I get two errors.
The first error does not always appear, but it is when the page has finished loading:
Line: 125
Char: 1
Error: Expected identifier, string or number
Code: 0
The second is when I click the submit button:
Line: 62
Char: 1
Error: 'form' is undefined
Code: 0
'form' is what I renamed the variable 'v', when I was trying to find out what this error was about.
Just in case it is needed, here is the HTML I have for the form page:
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
[... irrelevant code removed by admin ..]
<script>
// form fields description structure
var a_fields = {
'FullName': {
'l': 'Full Name', // label
'r': true, // required
'f': 'alpha' // format (see below)
//'t': 'name', //id of the element to highlight if input not validated
//'m': null, // must match specified form field
//'mn': 2, // minimum length
//'mx': 10 // maximum length
},
'Address1':{'l':'Address Line 1','r':true},
'Address2':{'l':'Address Line 2','r':true},
'Postcode':{'l':'Postcode','r': true},
'TelephoneNumber':{'l':'Telephone Number','r':true,'f':'phone'},
'EmailAddress':{'l':'Email Address','r':false,'f':'email'},
'Enquiry':{'l':'Enquiry','r':true},
},
o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}
// validator constructor call
var form = new validator('enquiry', a_fields, o_config);
</script>
</body>
</html>
|
Thanks in advance for any help.
Nick
|
|
|
wene
Junior Member
Posts: 4
Registered: 12/21/2004
Member Is Offline
|
| posted on 12/23/2004 at 07:35 AM |
|
|
had the same issue:
i believe it is the following:
/'Enquiry':{'l':'Enquiry','r':true},
},
no commata allowed after the last activation of a validation...:
/'Enquiry':{'l':'Enquiry','r':true}
},
the second error was probably caused by the first...
hope it works, and merry christmas
|
|
|
|