Page 1 of 1

Javascript Enable?

Posted: Tue May 08, 2007 6:43 am
by Mohit_Prog
Hi friend,

How can I check whether Client machin's Javascript is ON or OFF?

It is urgent. Please reply soon.

Posted: Tue May 08, 2007 6:48 am
by superdezign
I'm sure that you can. I'm not familiar with the way to do so, but what I'd do (personally) is create a cookie in JavaScript and then check if the cookie exists or not in PHP. If it doesn't then give them a different version of the website. But that's the only way I can think of for it to mesh with PHP code. If that's not what you want, I'm sure you can Google it.

Posted: Tue May 08, 2007 6:52 am
by CoderGoblin
You can't. You can check if the browser has javascript capability using PHP get_browser but unless you use the html <noscript> tag to insert some hidden information (in a form for instance) you have no information as to the current browser settings such as disabled javascript.