Detecting JavaScript problem

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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
 
Back
Top