Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Validation works on FFox but not IE
webslinger00
Junior Member

Posts: 9
Registered: 1/2/2007
Member Is Offline
posted on 1/2/2007 at 10:36 AM Reply With Quote
Validation works on FFox but not IE


Can anyone help? The validation works in FFox but not IE 6. Is there something simple that I am missing? I can't seem to find an answer in the forums. In turn, I'll help anyone I can.

Here is my code below:

<!-- TEXTBOX CHARACTER COUNT HERE -->

...Unecessary code removed here for this post....

-->

<!-- TEXTBOX CHARACTER COUNT HERE -->

<!-- FIRST PART VALIDATION CODE STARTS HERE INCLUDING SOME CSS-->

<style>
/* classes for validator */
.tfvHighlight
{font-weight: bold; color: red;}
.tfvNormal
{font-weight: normal; color: black;}
</style>

<script language="JavaScript" src="validator.js"></script>

<!-- FIRST PART VALIDATION CODE ENDS HERE INCLUDING SOME CSS-->

</head>

<body>
<!-- FORM STARTS HERE -->
<strong><font size="1" face="Tahoma, Arial, Verdana">All fields are required.
</font></strong>
<form action="...CGI script hosted on my server..." enctype="application/x-www-form-urlencoded" method="get" name="registration" onsubmit="return v.exec()">
<table width="40%" bordercolor="#FFFFFF">
<tr>
<td id="t_first_name" width="17%"><font size="1" face="Tahoma, Arial, Verdana">First
Name:</font></td>
<td width="83%"><input name="first_name" type="text" size="45"></td>
</tr>
<tr>
<td id="t_last_name" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Last
Name:</font></td>
<td width="83%"><input name="last_name" type="text" size="45"></td>
</tr>
<tr>
<td id="t_Email" width="17%"><font size="1" face="Tahoma, Arial, Verdana">E-mail:</font></td>
<td width="83%"><input name="email" type="text" size="45"></td>
</tr>
<tr>
<td id="t_phone_number" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Phone
Number:<br />
(include dashes)</font></td>
<td width="83%"><input name="phone_number" type="text" size="45"></td>
</tr>
<tr>
<td id="t_city" width="17%"><font size="1" face="Tahoma, Arial, Verdana">City:</font></td>
<td width="83%"><input name="city" type="text" size="45"></td>
</tr>
<tr>
<td id="t_state" width="17%"><font size="1" face="Tahoma, Arial, Verdana">State:</font></td>
<td width="83%"><input name="state" type="text" size="45"></td>
</tr>
<tr>
<td id="t_country" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Country:</font></td>
<td> <select name="country" class="style4" >
<...removed for this post...>
</select> </td>
</tr>
<tr valign="top">
<td id="t_story" width="17%"><font size="1" face="Tahoma, Arial, Verdana">
Tell Us Your Story: <br />
(500 words or less): </span></font></th>
<td> <textarea name="bannerURL" cols="45" rows="12" wrap="VIRTUAL" class="text" id="eBann" onkeyup="Contar('eBann','sBann','{CHAR} characters left.',500);"></textarea>
<br />
<span id="sBann" class="minitext"><font size="1" face="Tahoma, Arial, Verdana">500
characters left.</font></span> </td>
</tr>
<tr>
<th colspan="2" align="left"><font size="1" face="Tahoma, Arial, Verdana"><span class="style9"><br />
Primary Reference</span><span class="style10">:<br />
</span></font></th>
</tr>
<tr>
<td id="t_first_reference_name" width="17%"><font size="1" face="Tahoma, Arial, Verdana">First
Reference Name:</font></td>
<td width="83%"><input name="first_reference_name" type="text" size="45"></td>
</tr>
<tr>
<td id="t_first_reference_phone_number" width="17%"><p><font size="1" face="Tahoma, Arial, Verdana">First
Reference Phone Number:<br />
(include
dashes)</font></p>
</td>
<td width="83%"><input name="first_reference_phone_number" type="text" size="45"></td>
</tr>
<tr>
<td id="t_first_reference_relationship" width="17%"><font size="1" face="Tahoma, Arial, Verdana">First<br />
Reference Relationship:</font></td>
<td width="83%"><input name="first_reference_relationship" type="text" size="45"></td>
</tr>
<tr>
<td id="t_first_reference_email" width="17%"><font size="1" face="Tahoma, Arial, Verdana">First
<br />
Reference<br />
E-mail:</font></td>
<td width="83%"><input name="first_reference_email" type="text" size="45"></td>
</tr>
<tr>
<th colspan="2" align="left"><span class="style10"><font size="1" face="Tahoma, Arial, Verdana"><span class="style9"><br />
Secondary Reference</span><span class="style10">:</span></font></span></th>
</tr>
<tr>
<td id="t_second_reference_name" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Second
Reference Name:</font></td>
<td width="83%"><input name="second_reference_name" type="text" size="45"></td>
</tr>
<tr>
<td id="t_second_reference_phone_number" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Second
Reference Phone Number:<br />
(include dashes) </font></td>
<td width="83%"><input name="second_reference_phone_number" type="text" size="45"></td>
</tr>
<tr>
<td id="t_second_reference_relationship" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Second<br />
Reference Relationship:</font></td>
<td width="83%"><input name="second_reference_relationship" type="text" size="45"></td>
</tr>
<tr>
<td id="t_second_reference_email" width="17%"><font size="1" face="Tahoma, Arial, Verdana">Second<br />
Reference<br />
E-mail:</font></td>
<td width="83%"><input name="second_reference_email" type="text" size="45"></td>
</tr>
<tr>
<th align="left"><span class="style10"></span></th>
<td>&nbsp;</td>
</tr>
<tr>
<th align="left"><span class="style10"></span></th>
<td> <input type="reset" name="Reset" value="Reset" /> <input type="submit" name="Form_Submit" value="Submit Form" />
</td>
</tr>
</table>
<input type="hidden" name="_vDeckformid" value="608" />
</form>

<!-- FORM ENDS HERE -->

<!-- LAST PART OF VALIDATION CODE STARTS HERE -->

<script>
// form fields description structure
var a_fields = {
'first_name':{'l':'First Name','r':true,'f':'alpha','t':'t_first_name'},
'last_name':{'l':'Last Name','r':true,'f':'alpha','t':'t_last_name'},
'email':{'l':'E-mail','r':true,'f':'Email','t':'t_Email'},
'phone_number':{'l':'Phone Number','r':true,'f':'phone','t':'t_phone_number'},
'city':{'l':'City','r':true,'f':'alpha','t':'t_city'},
'state':{'l':'State','r':true,'f':'alpha','t':'t_state'},
'country':{'l':'Country','r':true,'t':'t_country'},
'bannerURL':{'l':'Your Story','r':true,'t':'t_story'},
'first_reference_name':{'l':'First Reference Name','r':true,'f':'alpha','t':'t_first_reference_name'},
'first_reference_phone_number':{'l':'First Reference Phone Number','r':true,'f':'phone','t':'t_first_reference_phone_number'},
'first_reference_relationship':{'l':'First Reference Relationship','r':true,'f':'alpha','t':'t_first_reference_relationship'},
'first_reference_email':{'l':'First Reference E-mail','r':true,'f':'Email','t':'t_first_reference_email'},
'second_reference_name':{'l':'Second Reference Name','r':true,'f':'alpha','t':'t_second_reference_name'},
'second_reference_phone_number':{'l':'Second Reference Phone Number','r':true,'f':'phone','t':'t_second_reference_phone_number'},
'second_reference_relationship':{'l':'Second Reference Relationship','r':true,'f':'alpha','t':'t_second_reference_relationship'},
'second_reference_email':{'l':'Second Reference E-mail','r':true,'f':'Email','t':'t_second_reference_email'},


},

o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}

// validator constructor call
var v = new validator('registration', a_fields, o_config);

</script>

<!-- LAST PART OF VALIDATION CODE ENDS HERE -->

</body>
</html>
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 1/2/2007 at 12:28 PM Reply With Quote

First of all I'd removed commas that may cause syntax errors in some browsers. For example:

'second_reference_email':{'l':'Second Reference E-mail','r':true,'f':'Email','t':'t_second_reference_email'},

the comma at the end of the line above is right before the closing bracket on the next line. There is no element this comma separates.
View User's Profile View All Posts By User U2U Member
webslinger00
Junior Member

Posts: 9
Registered: 1/2/2007
Member Is Offline
posted on 1/2/2007 at 01:03 PM Reply With Quote

Thanks for the help. Tried that and removed all the commas and it didn't help.

This is the error that I get:

Line: 467
Char: 2
Error: Expected '}'
Code: 0

BTW, overall, I think this is a very cool tool. I also like some of the other tools you guys have developed (ie the menu tool).

Thanks in advance.
View User's Profile View All Posts By User U2U Member
webslinger00
Junior Member

Posts: 9
Registered: 1/2/2007
Member Is Offline
posted on 1/2/2007 at 01:35 PM Reply With Quote

One more thing. I tried the debugger and go this:

"Expected identifier, string or number".

Again, any help is much appreciated.

Thanks.
View User's Profile View All Posts By User U2U Member
webslinger00
Junior Member

Posts: 9
Registered: 1/2/2007
Member Is Offline
posted on 1/2/2007 at 02:38 PM Reply With Quote
Fixed!


I fixed it. I deleted the last comma as you suggested.

Thanks.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004