471,595 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Detecting JavaScript problem

ron
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!

Oct 23 '06 #1
2 1080
"ron" <ro*@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...
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 <noscripttag:
http://www.plus2net.com/javascript_t...pt_support.php
Oct 23 '06 #2
If I remember correctly thats telling you the browser is capable of
javascript, not if its turned on or not!

http://www.15seconds.com/issue/030303.htm

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"ron" <ro*@discussions.microsoft.comwrote in message
news:94**********************************@microsof t.com...
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!

Oct 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Frances Del Rio | last post: by
13 posts views Thread by dave yan | last post: by
25 posts views Thread by Ryan Stewart | last post: by
11 posts views Thread by Dag Sunde | last post: by
3 posts views Thread by regtrashcan | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.