javaEnabled a reliable way to test whether Javascript is on?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

javaEnabled a reliable way to test whether Javascript is on?

Post 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.
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post 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! :( )
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Re: javaEnabled a reliable way to test whether Javascript is

Post 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.
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post 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.
Post Reply