Board Logo

Only working in Firefox
Maurice - 9/14/2006 at 02:09 PM

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&nbsp;</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 - 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 - 9/14/2006 at 03:27 PM

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 - 9/14/2006 at 10:18 PM

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.


pengman - 10/15/2008 at 03:03 PM

I've got exactly the same problem - the validaotr works in Firefox but not in IE (v 6 anyway). And yes, I too had an comma after the last item in the fields declaration, but in my case removing it made no difference. Could you please define "turn on more validator's alerts".


pengman - 10/17/2008 at 04:46 PM

Sorted this myself. The problem was a comma after the FIRST item in the fileds declaration. Now running perfectly. This is a GREAT tool - shame there aren't a few more text/character formats available to choose from though.


tigra - 10/18/2008 at 12:35 AM

The nice thing is that you can extend it with any formats you want.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/