473,396 Members | 1,833 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,396 software developers and data experts.

Detect if JS is enabled

40
Hi all

I 'm writing a small web app and I would like to know what ways there are to check if the users' browser has JS enabled. I know I can create a page that redirects to a different page using JS but I was wondering if there is a better way of doing it, e.g. do it from the same page.

Thanks a lot
stack
Apr 8 '09 #1
4 2977
dmjpro
2,476 2GB
Have a look at this ;)
Apr 8 '09 #2
acoder
16,027 Expert Mod 8TB
I think that's exactly the kind of thing he wanted to avoid.

To detect if JavaScript is enabled, just put the code in script tags. Make it unobtrusive, i.e. not inline and the code will run if JavaScript is enabled and will be ignored if it's disabled.
Apr 8 '09 #3
stack
40
Thank you both for your answers. Yes acoder that was what I was trying to avoid :-). I don't know if you 're using gmail. If you try to login to your account and JS is disabled, the page won't load. This is what I would like to accomplish if possible.
Apr 8 '09 #4
acoder
16,027 Expert Mod 8TB
Add the page functionality using JavaScript (create elements dynamically) and a noscript message informing the user that they must enable JavaScript to use the page.
Apr 8 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Agoston Bejo | last post by:
Hi, I searched around everywhere on the net, but could not find a simple example of detecting if cookies are enabled - on server side, and without moving from one page to another. This should be...
0
by: Christian Perthen | last post by:
Hi, I know that with server variables you can detect browser setting. How do I find out if a popupblocking is enabled? Thanks in advance Christian
23
by: David McCulloch | last post by:
QUESTION-1: How can I detect if Norton Internet Security is blocking pop-ups? QUESTION-2a: How could I know if a particular JavaScript function has been declared? QUESTION-2b: How could I...
6
by: NWx | last post by:
Hi, How can I detect is cookies are enabled or not in client browser? Thanks?
9
by: VK | last post by:
if ((window)&&(window.netscape)&&(window.netscape.security)) { // OK, this is Gecko/Firefox or someone mimicing it so well // that there is no way to catch it on the act. } But I need Firefox...
0
by: ApexData | last post by:
Hello I launch the Find Dialog Box from a button on a form. How can I determine specifically when the Find Dialog Box is no longer being displayed? This will allow me to control my Button...
6
by: Fred Hedges | last post by:
Using .NET 1.1, I need to be able to detect if Themes are enabled or disabled, not for a specific application, but for the system as a whole (ie. the current user). The reason I need to be able to...
2
by: Sergei Gnezdov | last post by:
Hi, How can an external .NET 2.0 application check if IIS does not have ASP.NET 2.0 enabled?
1
stepterr
by: stepterr | last post by:
Hi All, Does anyone know if it is possible to detect if a user has SSL enabled in their browser? I have a login page that is https but if the user does not have SSL enabled it of course just gives...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.