Question Locked

Javascript validation works fine in chrome & F/fox but not in IE, why?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a web page that has javascript validation which works fine in both Chrome & firefox but does not work correctly in Internet Explorer. There is a radio button field that when checked requires further validation that a new address is entered, when all address fields are entered it should submit, only then. IE will not do this even though it validates . I have copied the code in below.
Can anyone please help & shed some light on this for me?

Thanks in advance.
Agni




Joe's Orders1



All produce at Joe's

Menu

Links:

www.health.gov.au



Order form for Joe's Fruit Shop


An * means you must fill in the details:


For more information email: info@joe's.com.au


This document was last modified on:

5 replies

by seanferd

And it's because MS uses their own craptastic jscript engine.

by agnidev108

So how do I get around this?
& dude how would I post code in a forum?

by christian.vigh

Well I will not spend time trying to suggest you there is a correct way to post html code on this forum... because I have not read the how-to's for that !

However, looking at the source code of your form, I noticed the following (but I don't know if it will solve the problem) :

onsubmit="return validate_form(this)"id="orderForm"

There is a space missing between the last quote of the onsubmit attribute and the id attribute ; so you should correct it so that it looks like :

onsubmit="return validate_form(this)" id="orderForm"

(with a space before the 'id=' attribute).

IE is more strict than Firefox on this kind of syntactic deviations.

With kind regards,
Christian.

by agnidev108

Hi Christian,
Thanks kindly for taking the time to look & give advise.
best regards
Agni

This discussion is closed to new replies.