Tutorial :Detect if Javascript is enabled? [duplicate]


Possible Duplicate:
How to detect if JavaScript is disabled?

Is it possible to detect whether javascript has been disabled if so redirect to another page? My application is being developed with JSPs, as I am using a lot of fancy javascript stuff in my application.
Thanks in Advance


You can use the <noscript> tag: http://www.boutell.com/newfaq/creating/detectjs.html


Know this is an old thread, but just thought it add my own solution. I have javascript controlled <div> and on a browser where javascript is disabled, none of these are show so:

  1. Have a standard <div> in center of page saying “please enable javascript to view or click here for non javascript page”

  2. Set the z-value to -1

  3. Have all javascript controlled <div> and set with a white/whatever background and a z-index value to 0 or higher

The javascript controlled <div> will cover the message if enabled, and show it if not.

Hope that this gives one or two of you a few ideas. Although this was specifically for my site, you may find that thinking out the box may help you too.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »