3

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
Dean

1
  • Found another answer to this question at stackoverflow.com/questions/121203/… > "noscript" tag IS the most semanticly > accurate way to specify non-javascript > content - and rather then detecting if > javascript is disabled, detect if it's > enabled. So show the "you need > javascript to properly use my site" > message by default, but hide it with a > javascript function immediately > onLoad. – matt lohkamp Commented Jun 29, 2010 at 16:16

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.