Detecting JavaScript problem

G

Guest

Hi,

I working on a .net web project which need to check javascript disabled or
enabled. I use the code below:

If Request.Browser.JavaScript = True Then
....
end if

The problem is 'Request.Browser.JavaScript' always return 'true' . I don't
know how to fix the problems.

Does anybody know why?

Thanks and Please!
 
M

Mark Rae

I working on a .net web project which need to check javascript disabled or
enabled. I use the code below:

If Request.Browser.JavaScript = True Then
...
end if

The problem is 'Request.Browser.JavaScript' always return 'true' . I don't
know how to fix the problems.

Does anybody know why?

Request.Browser.JavaScript doesn't check whether JavaScript is disabled or
enabled - it checks whether the browser *supports* JavaScript or not. Pretty
much every single browser does these days, so this is pretty much useless.

Fortunately, there is a very simple solution using the <noscript> tag:
http://www.plus2net.com/javascript_tutorial/javascript_support.php
 

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,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top