Welcome! Log In Create A New Profile

Advanced

[WB] Detect Javascript on/off

Posted by David 
David
[WB] Detect Javascript on/off
January 09, 2009 12:05PM
Hi,

I would like to detect that JavaScript is on or off in user browser.

I can use this.

<noscript>
JavaScript is turned off in your web browser. Turn it on to take full advantage of this site, then refresh the page.
</noscript>

I want to put that at the and part of web code in template. Exactly before </BODY>

I tried put that in a last element (html after) in my template but it doesn't work.

Or maybe there is other way to detect Javascript and display info.

Thanks
ocakici
Re: [WB] Detect Javascript on/off
February 02, 2009 08:07AM
anything between HTML <noscript></noscript> tags are parsed if Javascritp is disabled.
You can place any HTML control between and display information.

The other way would be to run a simple Javascript code to update a variable/flag on the page to see whether Javascript is running or not..
ocakici
Re: [WB] Detect Javascript on/off
February 02, 2009 08:59AM
text did not appear correctly due t use of noscript tags...
should be like:

anything between "<"+noscript"+">" HTML tags are parsed if Javascritp is disabled.
You can place any "<"+noscript"+">" HTML control between and display information.

The other way would be to run a simple Javascript code to update a variable/flag on the page to see whether Javascript is running or not..
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: