views:

88

answers:

3

Hi,
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

+5  A: 

Found another answer to this question at http://stackoverflow.com/questions/121203/how-to-detect-if-javascript-is-disabled

"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

djangofan
A: 
 document.write("Is Java enabled? " + navigator.javaEnabled() );
Salil
thats a 100% javascript answer and so if you dont have javascript enabled this helps you not.
djangofan
@djangofan :disbale javascript and check it out it will return false.
Salil
ok. ill upvote you since its an interesting idea.
djangofan
+2  A: 

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

Jim Lamb