473,390 Members | 1,100 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 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 1131
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var...
13
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
4
by: Hal | last post by:
Can someone please tell me what is wrong with this script? <script language="JavaScript"> <!-- function HF_CloseAllChildren() { if (g_win1) != undefined { if ((g_win1) && !(g_win1.closed))...
12
by: Wladimir Borsov | last post by:
On one of my web pages there is an java applets which works fine on my computer. However I noticed on some other computer that the run of java applets are disabled. I got an error message...
25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
11
by: Dag Sunde | last post by:
We have this web-app that requires Javascript to be enabled in the UA (this is okay'ed by our customer). Now I want to make a "pre" page before the login screen, informing the user that he/she...
3
by: regtrashcan | last post by:
I have a webpage that detects whether Shockwave Player is installed and the version number. The javascript/vbscript that I use has worked fine until the latest release of the Shockwave Player. I am...
79
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the...
4
by: almurph | last post by:
Hi everyone, I'm a newbie to javascript. I have written some code to detect when a user presses the down-arrow, up-arrow and enter button. Essentially the user can arrow down or up through a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.