Maurice
Junior Member
Posts: 3
Registered: 9/14/2006
Member Is Offline
|
| posted on 9/14/2006 at 02:09 PM |
|
|
Only working in Firefox
We have installed the code on 2 different servers with 2 different formmail programs. In both cases, it works fine in Firefox, but does absolutely
nothing in I.E. or Safari. We are testing on Macs and PCs with the same results. It appears that the javascript is not executing.
I am totally baffled here!
To make things worse, the demo1.html and demo2.html files on the same 2 servers work fine in all browsers. And I basically just copied the code
straight across out of the demo files. Its the same code! So it has to be a conflict with a formmail program or something else. But it is running
the same way on 2 servers with 2 different formmail programs.
Someone PLEASE help!
Here is my code:
---In the header:
<script language="JavaScript" src="validator.js"></script>
---Form setup in the body:
<form method="post" action="ledformmail.php" name="list" onSubmit="return v.exec()">
---The first form field:
<td height="30" align="right" style="font-size: 16px; font-weight: bold" id="t_firstname">First Name </td>
<td><input name="First_Name" type="text" tabindex="1" size="30" maxlength="30" /></td>
---The script right before the body end:
<script>
var a_fields = {
'First_Name':{'l':'First Name','r':true,'f':'alpha','t':'t_firstname'},
},
o_config = {
'to_disable' : ['Submit', 'Reset'],
'alert' : 1
}
// validator constructor call
var v = new validator('list', a_fields, o_config);
</script>
|
|
|
tigra
Administrator
Posts: 1868
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/14/2006 at 02:12 PM |
|
|
turn on more validator's alerts. also check that your form has both submit and reset buttons (your script is configured to disable them both).
|
|
|
Maurice
Junior Member
Posts: 3
Registered: 9/14/2006
Member Is Offline
|
| posted on 9/14/2006 at 03:27 PM |
|
|
Tried...
I turned off the 'Reset' button disable. That didn't help.
I turned on more fields... to validate, but that didn't help (see below).
I closed the form with this line:
<input type="submit" name="Finished" value="Finished" />
Does that matter?
What else? Please define "turn on more validator's alerts".
<script>
// form fields description structure
var a_fields = {
'First_Name':{'l':'First Name','r':true,'f':'alpha','t':'t_firstname'},
'Last_Name':{'l':'Last Name','r':true,'f':'alpha','t':'t_lastname'},
'Phone':{'l':'Telephone Number','r':true,'f':'phone','t':'t_phone'},
'email':{'l':'E-mail','r':false,'f':'email','t':'t_email'},
},
o_config = {
'to_disable' : ['Submit'],
'alert' : 1
}
// validator constructor call
var v = new validator('list', a_fields, o_config);
</script>
|
|
|
Maurice
Junior Member
Posts: 3
Registered: 9/14/2006
Member Is Offline
|
| posted on 9/14/2006 at 10:18 PM |
|
|
Fixed!
for the record, it was the fact I had a comma after the last item in the fields variable definition. Still worked in Firefox, but nothing else.
Thanks for looking at it.
|
|
|
|