Detecting script enabled

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.
 
M

Mark Rae

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.
 
B

Barry

Hi

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

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top