Detecting script enabled

  • Thread starter Thread starter Kevin Spencer
  • Start date Start date
K

Kevin Spencer

Hi Barry,

The only way to do this is on the client side, which means that your first
Request isn't going to tell you anything, until you return your first
Response. At that point, you can use some JavaScript on the client side to
see whether it's enabled. If it doesn't run, it isn't enabled. For example,
you could attempt to set the value of a hidden form field. When the page
posts back, if the hidden form field has the same value it originally had,
you know that the JavaScript didn't work.

--
HTH,

Kevin Spencer
Microsoft MVP
Digital Carpenter

A man, a plan, a canal,
a palindrome that has gone to s**t.
 
How do i detect if the browser has javascript enabled.
Note: i am not refereing to Request.Browser.javascript

In addition to Kevin's reply, you should also look at the
<noscript></noscript> tag - the content within that tag will run if
JavaScript is disabled, so you can at least give the user a message saying
that the site makes use of JavaScript, and maybe they'd like to switch it
on...

Disable JavaScript temporarily and then go here:
http://www.sanctuaryrig.co.uk for an exmple.
 
Hi

How do i detect if the browser has javascript enabled.
Note: i am not refereing to Request.Browser.javascript

Barry
 
Back
Top