Page 1 of 1

javaEnabled a reliable way to test whether Javascript is on?

Posted: Mon Sep 13, 2004 11:01 am
by voltrader
Is this a reliable way to test for Javascript on/off across most browsers?

I would like to disable registration on my website if javascript is not enabled as I use it to validate some aspects of my registration forms.

Posted: Mon Sep 13, 2004 11:04 am
by mudkicker
i have a some kinda problem. how can i check (without installing all browsers) the scripts or pages that i wrote on all browsers?
(please don't say use dreamweaver's feature! :( )

Posted: Mon Sep 13, 2004 11:14 am
by kettle_drum
Mudkicker: Just make sure that your html/css is compliant with the standards and then test on IE and firefox - since frirefox, Opera, netscape and safari all display the same 95% of the time - so you can be sure that it will be ok on most browsers. Of course the only 100% way is to test it on all.

A good idea would be a website where you enter your url and then the server loads your page with several browsers and takes screen shots which it then shows you.

Voltrader: You can try to show the text/form on the page with javascript - so if they dont have it it wont show the form and they cant register.

Posted: Mon Sep 13, 2004 11:31 am
by feyd
using the <noscript> tags will cover most browsers, you can use it to say "enable JavaScript" or you could have JavaScript insert the start of the form, and use the noscript to display something else.

Re: javaEnabled a reliable way to test whether Javascript is

Posted: Mon Sep 13, 2004 11:35 am
by jason
voltrader wrote:I would like to disable registration on my website if javascript is not enabled as I use it to validate some aspects of my registration forms.
The best way is to validate using somethin gon the server side, like PHP. Don't rely on JavaScript in being the only method of validation.

Posted: Mon Sep 13, 2004 12:56 pm
by voltrader
My reg forms are a mixture of php and javascript. It's just that radio buttons and check boxes lend themselves easily to javascript controls.

Thanks for the advice -- I'll use <SCRIPT> to forward to reg page and <NO SCRIPT> to echo javascript-needs-to-be-enabled message.

It looks like noone really uses the javaEnabled function.