Click to See Complete Forum and Search --> : validation works on some comp but not others. Why?


legolaz
02-18-2003, 02:00 AM
Why is it tat when i test it on my browser it works fine. However when a fren of mine tests it on his computer also running IE, it doesnt work?
pls advise.

d=document.contact.c_comments.value;
if (d.length < 1)
{
alert('Please do not leave Comments blank');
document.contact.c_comments.focus();
return false;
}

Geat
02-18-2003, 06:57 AM
Perhaps he's running an older version of IE than you? Or maybe he has Javascript disabled for some reason.

That's all I can think of...

legolaz
02-18-2003, 09:19 AM
So is there a way to make it work for all browsers?
or at least Most versions of IE

Geat
02-18-2003, 09:23 AM
Javascript HAS to be turned on, no doubt about that...

Have you tried

if (d == "") { alert("Don't leave commentsblank"); }

Instead?

Have you got a URL for the site?

legolaz
02-18-2003, 09:42 AM
Yeah here it is
the site is http://66.246.35.222/~sprint/home.htm
go to contact us and try it
tnks a million

Geat
02-18-2003, 09:49 AM
Works fine on mine mate - I guess your compadre is either using a really old browser version or has Javascript disabled.

The only way you could make it work in this case is to have the server validate the posted data, reload the form with a complaint written on it...

legolaz
02-18-2003, 10:07 AM
thanks a million

Geat
02-18-2003, 10:12 AM
Pleasure my elven friend.

legolaz
02-18-2003, 10:23 AM
haha
is tat why u answered this?
cos u sure look like agragon to me :P

Geat
02-18-2003, 10:28 AM
That's Boromir man - get it right!

legolaz
02-18-2003, 10:58 AM
haha ok then tnks boromir

legolaz
02-18-2003, 11:06 AM
Hey boromir,
i just checked wif my fren and shes using IE 6 and she has javascript enabled.
When she tests the page all the other validators work except for the comments
any ideas?

legolaz
02-18-2003, 11:12 AM
Hey boromir,
i just checked wif my fren and shes using IE 6 and she has javascript enabled.
When she tests the page all the other validators work except for the comments
any ideas?