How to tell if javascript is enabled?

They have: 850 posts

Joined: Jul 1999

Is there a way to tell if javascript is enabled on the surfers computer?

Thanks

------------------
The most used and accepted excuse for missing classes in University is "My Grandmother Died".
http://www.wiredstart.com : The Technology Start Page

They have: 296 posts

Joined: Sep 1999

Robp.

I am not sure what you mean? If you want to know how many people that are visiting your site have java enabled then I would suggest you get an extreme tracker. This tells you the specifications of all your visitors included weither they have java enabled or not.

~Vy~

They have: 850 posts

Joined: Jul 1999

I need to find out if the user specifically has javascript enabled. Somthing like a $variable eq 1 if the user has javascript enabled, and 0 if not. Is this possible?

------------------
The most used and accepted excuse for missing classes in University is "My Grandmother Died".
http://www.wiredstart.com : The Technology Start Page

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

robp,

If the user has javascript disabled how can you check a variable?

The best you can do is setup a <noscript> tag in html and put some link or message in there, only users with scripting disabled will see that message

Regards,
Peter J. Boettcher

PJ | Are we there yet?
pjboettcher.com

They have: 850 posts

Joined: Jul 1999

Peter, thanks a lot.

------------------
The most used and accepted excuse for missing classes in University is "My Grandmother Died".
http://www.wiredstart.com : The Technology Start Page

They have: 30 posts

Joined: Jan 2000

Peters answer is fine....
Another is to add...
<SCRIPT language="javascript>
//<!--
If you can read this you either have javascripting turned off in your browser or you have an archaic version and need to get with the program....
//-->
</SCRIPT>

As a policy its always good to put html comment tags around all scripting to avoid non javascript enabled browsers to see your scripting.

Also...there are several versions of javascript, I think, 1.1, 1.2, 1.3
You can test which version by...
<SCRIPT language="javascript">
var ja="0";
</SCRIPT>
<SCRIPT language="javascript1.1">
//<!--
ja=11;
//-->
</SCRIPT>
<SCRIPT language="javascript1.2">
//<!--
ja=12;
//-->
</SCRIPT>
<SCRIPT language=javascript1.3">
//<!--
ja=13;
//-->
</SCRIPT>

Stu

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.