473,511 Members | 14,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting script enabled

Hi

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

Barry
Sep 20 '06 #1
2 1347
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.

"Barry" <no****@nowhere.comwrote in message
news:uZ**************@TK2MSFTNGP02.phx.gbl...
Hi

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

Barry

Sep 20 '06 #2
"Barry" <no****@nowhere.comwrote in message
news:uZ**************@TK2MSFTNGP02.phx.gbl...
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></noscripttag - 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.
Sep 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3593
by: Matthew K Jensen | last post by:
In one of my "because I can" projects, I want to be able to see the enabled network interfaces on a machine. I have no clue as to how to do this. Any suggestions?
19
17154
by: Gav | last post by:
Hi, At the moment i am checking that all the fields have been filled out, at the moment i am using the following... if firstname = "" and surname = "" and address1 = "" and town = "" and county...
6
3147
by: Astra | last post by:
Hi All I have a Javascript to detect whether a client's browser has flash installed, but as so many people are putting me off relying on Javascript, could you please let me know if you know how...
20
7877
by: Mandy Memphis | last post by:
If I perform a mousedown within a document, move the mouse outside the browser window, and then release the mouse button, the document.onmouseup event does not fire. Is there any way to detect a...
25
2867
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
1765
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...
9
3048
by: SHarris | last post by:
Hello, In our new intranet ASP.NET project, two requirements are that the browser accept cookies AND JavaScript. We are requiring the use of Internet Explorer 6+. 1. Using C# in an ASP.NET...
4
1118
by: Samba | last post by:
Hi, I'm having a very genuine problem: I'm developing an ASP.NET web application. Since I'm using a lot of Javascripts in my pages, I want to ensure that my clients do not disable Script in...
12
2775
by: Anic297 | last post by:
Hi, This is certainly a simple question, but I'm a newbie in JavaScript. Is there a way to know if JavaScript is enabled? My php script uses JavasSript to do something. If JavaScript is not...
0
7237
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
7137
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
7349
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,...
1
7074
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...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.