473,796 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how universally enabled is Javascript?

Hi everyone,

I've just started adding JavaScript to some of my web pages. It then
occurred to me that of course not everyone may have JavaScript in their
browser and more probably may have JavaScript disabled for security reasons
(particularly on machines within a company network).

So my questions are,
1: is there any estimate available of the percentage of users not having
JavaScript available to them,
2: how much effort is worth putting into <noscript>..... .</noscript>
alternatives,
3: could someone recommend a guide (online or book) to writing JavaScript so
it gracefully degrades when not available.

Many thanks to you all,

John
Nov 29 '06 #1
11 1498
John Pote wrote:
Hi everyone,

I've just started adding JavaScript to some of my web pages.
It then occurred to me that of course not everyone may have
JavaScript in their browser and more probably may have
JavaScript disabled for security reasons (particularly on
machines within a company network).

So my questions are,
1: is there any estimate available of the percentage of users
not having JavaScript available to them,
There are lots. Some even resemble each other.
2: how much effort is worth putting into <noscript>
......</noscriptalterna tives,
None, NOSCRPT elements are of close to no use in dealing with the
consequences of javascript being disabled as javascript being disabled
is not the only condition in which scripts may not be able to act, and
so not the only condition for which designed fall-back is required (and
whatever suites the condition where scripting is available but cannot do
what it wants to do also suites the conditions where scripts cannot
execute at all).
3: could someone recommend a guide (online or book) to writing
JavaScript so it gracefully degrades when not available.
Possibly, but there will not be many. Searching the archives of
comp.lang.javas cript would probably turn up the most direct
consideration of the subject.

Richard.
Nov 29 '06 #2
ASM
John Pote a écrit :
1: is there any estimate available of the percentage of users not having
JavaScript available to them,
It's said about 10%
2: how much effort is worth putting into <noscript>..... .</noscript>
alternatives,
I think JS would have to be only in overlay, so noscript has no utility:
a "normal" page must work without JS, this last one bringing some
features not indispensable (decoration, help in forms ...)
3: could someone recommend a guide (online or book) to writing JavaScript so
it gracefully degrades when not available.
<a href="page.htm"
onclick="window .open(this.href );return false;">page</a>

If JS enabled the file 'page.htm' will be open in a new window,
if disabled the page is opened in same window.

An other way (not allowed in 'strict' where target is forbidden)
This time you'll get a new window (JS or not) :

<a href="page.htm" target="here"
onclick="window .open('','here' ,'width=400');" >page</a>

--
Stephane Moriaux and his less old Mac already out of date
Nov 29 '06 #3
Hi John,

John Pote wrote:
>
3: could someone recommend a guide (online or book) to writing JavaScript so
it gracefully degrades when not available.
A big part of the puzzle is feature detection
http://www.jibbering.com/faq/faq_not...er_detect.html

It seems like many people on comp.lang.javas cript are very concerned
with graceful degredation and I have been learning as much as I can so
I can make more informed decisions. There are many other developers out
there that don't care a bit. If it works on IE6+, FF1.5+, Opera8+,
Safari2+ then many are happy and have happy clients and all is well
with their worlds. I spent a lot of time thinking about degradation and
a while ago spewed some text about it
http://peter.michaux.ca/article/81 that is not definitive by any
stretch but may provoke thought.

The biggest problem seems to come when a branch of JavaScript starts
executing and once started must run to completion successfully. Suppose
that you rearrange the visual appearance of a page and hide certain
parts. If the browser won't let the person then make those hidden parts
reappear all is lost. So before rearranging the page you must make sure
the whole thing will work. The rearranging needs gateway tests before
starting to ensure the browser can handle everything required.

Here is an example on Richard's page that I found useful in
understanding some of the issues.

http://www.litotes.demon.co.uk/js_info/pop_ups.html

Peter

Nov 29 '06 #4
ASM said the following on 11/28/2006 8:53 PM:

<snip>
An other way (not allowed in 'strict' where target is forbidden)
This time you'll get a new window (JS or not) :

<a href="page.htm" target="here"
onclick="window .open('','here' ,'width=400');" >page</a>

<a href="page.htm" target="here"
onclick="window .open('',this.h ref);">page</a>

<g>

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 29 '06 #5

John Pote wrote:
So my questions are,
1: is there any estimate available of the percentage of users not having
JavaScript available to them,
http://www.thecounter.com/stats/2006/November/javas.php

Nov 29 '06 #6
Randy Webb wrote on 29 nov 2006 in comp.lang.javas cript:
ASM said the following on 11/28/2006 8:53 PM:

<snip>
>An other way (not allowed in 'strict' where target is forbidden)
This time you'll get a new window (JS or not) :

<a href="page.htm" target="here"
onclick="window .open('','here' ,'width=400');" >page</a>


<a href="page.htm" target="here"
onclick="window .open('',this.h ref);">page</a>
href position in window.open() is the first argumaent!

<a href="page.htm" target="here"
onclick="alert( window.open(thi s.href,this.tar get);"
>page</a>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 29 '06 #7
Evertjan. said the following on 11/29/2006 3:35 AM:
Randy Webb wrote on 29 nov 2006 in comp.lang.javas cript:
>ASM said the following on 11/28/2006 8:53 PM:

<snip>
>>An other way (not allowed in 'strict' where target is forbidden)
This time you'll get a new window (JS or not) :

<a href="page.htm" target="here"
onclick="window .open('','here' ,'width=400');" >page</a>

<a href="page.htm" target="here"
onclick="window .open('',this.h ref);">page</a>

href position in window.open() is the first argumaent!

<a href="page.htm" target="here"
onclick="alert( window.open(thi s.href,this.tar get);" >
page</a>
Oops!

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 29 '06 #8
Randy Webb wrote on 29 nov 2006 in comp.lang.javas cript:
>><a href="page.htm" target="here"
onclick="window .open('',this.h ref);">page</a>

href position in window.open() is the first argumaent!

<a href="page.htm" target="here"
onclick="alert (window.open(th is.href,this.ta rget);" >
page</a>

Oops!
Sorry, I don't know what my alert( does there!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 29 '06 #9
ASM
Randy Webb a écrit :
Evertjan. said the following on 11/29/2006 3:35 AM:
>Randy Webb wrote on 29 nov 2006 in comp.lang.javas cript:
>>ASM said the following on 11/28/2006 8:53 PM:

<snip>

An other way (not allowed in 'strict' where target is forbidden)
This time you'll get a new window (JS or not) :

<a href="page.htm" target="here"
onclick="window .open('','here' ,'width=400');" >page</a>

<a href="page.htm" target="here"
onclick="window .open('',this.h ref);">page</a>

href position in window.open() is the first argumaent!

<a href="page.htm" target="here"
onclick="alert (window.open(th is.href,this.ta rget);" >
page</a>

Oops!
Y a des fois où je me demande ... :-(

There's times I ask myself "did they read or not ?"

and I do say :
this.href in window.open() is not necessary in my example up there
because same target is declared (in html and in JS).

Please don't try to bad correct what is OK (and quite simple).
How could understand and what will remember a newbie reading your comments ?
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 29 '06 #10

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

Similar topics

12
2585
by: confused | last post by:
After expressing my interest in expanding my new knowledge of HTML and CSS into the wild realm of JavaScript, I was advised that it is wiser to avoid it, since not all browsers are use it or are enabled to read it. After searching for other opinions on the web, I found that some estimate that the frequency of browsers that can read JS currently is better than 90% -- that is certainly workable for me! Do you good people have any thoughts...
25
2922
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 script to invoke something on the server, and if it works, then it works. Is there a better way? I'm looking for the least intrusive way of doing it, from a web application point of view. i.e. I'd like to be able to drop this into an existing...
5
1835
by: Christian Ista | last post by:
Hi, Is it possible to check if the javascript is turn on on the browser (IE, firefox, ...)? Thanks, Christian,
13
8483
by: Alex Molochnikov | last post by:
Is there any way to find out programmatically if Javascript is supported/enabled in a browser? By "programmatically" I mean on the Java servlet side. TIA Alex Molochnikov Gestalt Corporation
5
9168
by: Leo J. Hart IV | last post by:
Hello, I'm hoping someone can help me out. I was wondering if the Enabled property of a CheckBox or RadioButton server control is stored in the ViewState. If not, is there some way to to add this property to ViewState? If needed, I can give you more info on exactly what I'm trying to do. Thanks,
10
1931
by: David Thielen | last post by:
Hi; When a user clicks a radio button, what I would like to do is that if javascript is enabled on their browser, it calls a javascript function and does not do a postback. If javascript is disabled, then it does do a postback. Is there a way to do this? -- thanks - dave
6
61605
by: Jim | last post by:
How do I check if javascript is enabled in PHP? TIA, Jim
18
2473
by: damezumari | last post by:
I would like to know how many of the visitors to my site has js enabled and how many has it turned off. I haven't found a simple solution searching Google groups so I suggest the following using php and mysql: Create a table mc_jscount table in mysql with two fields nonjs (int) and js (int). Create one record with nonjs and js set to zero. Put this code at the top of your page:
12
2806
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 enabled, I can put a "submit" push button. But I don't want both (the "submit" push button with the automatic action), so I want to know on the fly which one I must use (whether JavaScript is enabled).
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9525
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10221
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10169
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.