473,406 Members | 2,467 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,406 software developers and data experts.

Do viewers have JavaScript?

I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript?

I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.

JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.

QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?

Mason C
Jul 23 '05 #1
22 2772
Mason A. Clark <ma*******@THISix.netcom.comQQQ> wrote:
QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?


Yes, starting from the fact that even if JavaScript is enabled, the
browser might have been configured not to open pop-up windows.
Even Google toolbar does that. However this depends on _how_ you try to
create pop-up windows.

Any _automatic_ pop-up windows will make lots of people leave your site
and will be prevented by many programs and settings.

An _optional_ pop-up window, i.e. a link that opens in a new window, is
less risky and can be fairly safe if you first create a normal link,
with href="...", and then add the JavaScript code that overrides normal
link processing and opens a new window with specific properties. But
then you would also need to check whether new windows are allowed in
JavaScript (if(window.open) ...). Even then, some pop-up prevention
might hit you.

Do you really think you need pop-up windows so badly? What's wrong with
being just informative: include the information onto the page itself,
or behind a link on another page.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2
Mason A. Clark wrote:
QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?


IMO yes. I think your pages should be *enhanced* with Javascript, but
somehow still work with Javascript turned off. With Javascript turned
off, an extra roundtrip to the server would be needed while with client
side Javascript it can be handled client side without the round trip.

For example, take an expanding/collapsing outline menu. With Javascript
enabled, you can just show/hide subsections with CSS and switching
classes with Javascript, while without Javascript, the server should
show the partially expanded sections, and clicking on such a link would
reload a slightly modified page to show or hide a subsection. I hope I
make some sense.

--
Bart.
Jul 23 '05 #3
Mason A. Clark wrote:
I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript?
Yes, if the page *depends* on JavaScript, then it will likely not remain
accessible to any browser without JavaScript support.
I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.
Then, based on that statement, those sites did not *depend* on
javascript, but merely used it to enhance the site. JavaScript should
always be used in a way that benefits those with javascript support, but
does not negatively affect those without.
JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.
Such practices are evil for the very reason such messages appear. If
you visited my site and I demanded that you configure *your* browser the
way *I* liked, would you really stick around for more?
QUESTION: Am I running any risk with a page that
*depends* on javascript
Yes. You will either turn away or at least annoy a fraction of your
users by requireing JavaScript to be enabled for some features to be
accessible.
for informative pop-up windows?


You will annoy even more users by using popup windows.

You should read this brief tutorial about how and why you should use
unobtrusive javascript. I don't know if it will contain any material to
address your particular requirements, but it does contain a very good
overview of good scripting practices.
http://www.onlinetools.org/articles/...ivejavascript/

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #4
> Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?


As others have said it is best to not depend on Javascript and things
like

<a href="foo" onclick="openfoowindow(); return false;">...

mean that you can normally offer a fallback with little pain. Also
look up <NOSCRIPT> if you don't know about it. I have this:

<noscript>
<link rel="stylesheet" type="text/css" src="noscript.css">
</noscript>

in the header, which allows me to display:none the bits of the page
that rely on scripts. Note that this NOT legitimate HTML but either
works or is ignored by all the browsers that I've seen. (Any comments
anyone?)

How many of your visitors will be inconvenienced because you reply on
Javascript does depend on the type of site that it is and the
demographics of the visitors. By coincidence this morning I have been
plotting some graphs of this sort of thing for one of my sites and I've
been suprised to find that not a single user has Javascript disabled!
It's well worth doing a study like this because the results might not
be what you were expecting or what others told you. For example,
although the effort that I've put into making the site work when JS is
disabled may be partly wasted[*], I've also found that users have much
smaller screens than I expected. Only a tiny fraction seem to have a
1280x1024 monitor (and practically all of them are Mac users) with more
than a third using a window smaller than 900x500! Of course the site
is fluid enough to work in these small windows, but they weren't what I
had in mind when I designed it. Your visitors will probably be
different, so I encourage you to measure them.
[*] Of course the largest category of visitors who don't have JS
enabled are search engines, and making sure that they can reach all of
the content is important.

<RANT>As for pop-up windows, forget them. In the way that spam has
ruined email, popups are ruined by their use for advertising. Don't
design a site that relies on users doing things by email: too many of
them will give bogus email addresses because they're afraid of spam, or
they'll have whitelist-based filtering so your message (containing
their new password for your site or whatever) will never reach them, or
it will reach them but they'll have forgotten that they signed up and
report you to someone who'll blacklist you. The same applies to
popups: you may think that a popup is the right thing to use, and I
might agree in principle, but the whole concept is now so tarnished in
users' minds that you might as well be selling penis-pills. Your
friendly popup message saying "Are you sure you want to close, you
haven't saved it?" will get trapped and converted into "THIS NASTY SITE
TRIED TO OPEN AN OBNOXIOUS ADVERT FOR PENIS PILLS WOULD YOU LIKE TO
COMPLAIN ABOUT THEM TO THE FTC???" by the user's browser.
Aaarrrgghh!!!!</RANT>

--Phil.

Jul 23 '05 #5
me
"Mason A. Clark" <ma*******@THISix.netcom.comQQQ> wrote in message
news:84********************************@4ax.com...
I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript?

I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.

JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.

QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?

Mason C


I see no reason not to use JavaScript but I would not use windows that popup
automatically via JavaScript. Popup windows are IMO persona non grata to
most users. If you fear that some users may not be able to access items in
your pages that depend on JavaScript then use the following tag directly
below the JavaScript to alert them to this possibility:
Good Luck,
me

<NOSCRIPT>This will not work without JavaScript enabled. Please enable
JavaScript, thank you!</NOSCRIPT>
Jul 23 '05 #6
"Mason A. Clark" wrote in comp.infosystems.www.authoring.html:
I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript?


Yes, it's a problem.

It's one thing to make a page where the experience is enhanced with
Javascript. But to make it _depend_ on Javascript is a really bad
idea.

You say you visited some popular sites and they looked okay. The #1
misuse of Javascript, in my opinion, is in navigation. if you tried
navigating thoise sites without Javascript you would have found
some of them entirely unusable because the clueless Web dee-zigh-
nurrs required Javascript.

Here's a typically egregious example:
http://www.michaelstevenstech.com/xpfaq.html
The links do in fact have href= attributes, but they don't work
because he depends on Javascript rewriting them on the fly. Or
something. Net effect: an unusable site, and inaccessible
information.

(This URL was posted in a Windows XP help group. I did draw the
problem to the page author's attention.)

It's particularly disappointing that so many people go out of their
way to create contrtions like this. In effect, they spend massive
amounts of effort to make their sites less usable. "Oh, what fools
these mortals be!"

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 23 '05 #7
me wrote:
<NOSCRIPT>This will not work without JavaScript enabled. Please enable
JavaScript, thank you!</NOSCRIPT>


If you regularly surfed with JS disabled, do you realise how irritating
that would get? Why should a user adjust their browser settings to
match yours in any way whatsoever? Also, noscript is intended to
provide suitable alternate content for users without JS, not point out
their limitiations.

That example is just as bad as:

<img ... alt="Please turn on images.">

<noframes>
<p>Your browser does not support frames, please upgrade to IE 5.</p>
</noframes>

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 23 '05 #8
Lachlan Hunt wrote:
me wrote:
<NOSCRIPT>This will not work without JavaScript enabled.
Please enable JavaScript, thank you!</NOSCRIPT>


If you regularly surfed with JS disabled, do you realise how
irritating that would get? Why should a user adjust their
browser settings to match yours in any way whatsoever? Also,
noscript is intended to provide suitable alternate content for
users without JS, not point out their limitiations.

<snip>

The proposal gets even worse when you consider that there are almost no
browser scripts that are exclusively dependent on scripting support
alone. That is, they almost all require on the browser in question
implementing some specific features in its object model. As browser
object models differ considerably in what they implement (and are more
or less dynamic in how they respond to manipulation of that object
model) there is every chance that at least some visitors willing and
capable of enabling javascript to view the page will still not
experience an actively functional script. Which will make the author of
the page look very foolish for making a demand and then not delivering
when the visitor satisfies it.

Richard.
Jul 23 '05 #9
me
"Lachlan Hunt" <sp***********@gmail.com> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
Why should a user adjust their browser settings to
match yours in any way whatsoever?


Do you think I will adjust my opinion to suit you in any way whatsoever?
Signed,
me
Jul 23 '05 #10
me
"Lachlan Hunt" <sp***********@gmail.com> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
me wrote:
<NOSCRIPT>This will not work without JavaScript enabled. Please enable
JavaScript, thank you!</NOSCRIPT>


If you regularly surfed with JS disabled, do you realise how irritating
that would get? Why should a user adjust their browser settings to
match yours in any way whatsoever? Also, noscript is intended to
provide suitable alternate content for users without JS, not point out
their limitiations.

That example is just as bad as:

<img ... alt="Please turn on images.">

<noframes>
<p>Your browser does not support frames, please upgrade to IE 5.</p>
</noframes>

--
Lachlan Hunt


I find it very amusing that on your about page
http://lachy.id.au/about/aboutme you list www.thefarmshed.com.au as a site
that you "completely redesigned to be standards compliant" (though you do
say you're no longer involved with the site).

Not only does the Farmshed site use a very annoying JavaScript popup window
(on every page) without toolbars or buttons it also uses a decidedly non
fluid table based layout. There's also a proprietary tag for an IE Favicon.
How frustrated you must be, you have my sympathies. I also found some errors
on the Farmshed site too.
Signed,
me

PS: Your site doesn't degrade in IE6, although it does make an attempt to do
so when it first loads. :-(
Jul 23 '05 #11
Yesterday, ph*******@treefic.com <ph*******@treefic.com> wrote, in part:
look up <NOSCRIPT> if you don't know about it. I have this:

<noscript>
<link rel="stylesheet" type="text/css" src="noscript.css">
</noscript>

in the header, which allows me to display:none the bits of the page
that rely on scripts. Note that this NOT legitimate HTML but either
works or is ignored by all the browsers that I've seen. (Any comments
anyone?)


I'd say it's better to use the script to write itself instead of relying
no-script browsers' using CSS.

In one page, I have something like

<style type="text/css">div{display:none}</style>
<script type="text/javascript"><!--
function n(){document.getElementsByTagName("style")[0].disabled=true;};
document.write('<a href="#n" id="n" onclick="n()">See [foo].<\/a>');
//--></script>

Of course, what I have is no solution if it's essential that [foo] be
hidden until the user wants to see it. After all, it won't work in a no-
script browser, nor in a no-style browser, and it totally fails in a
no-script, yes-style browser. It's no solution, except that this page has
a readership of eight, all of whom are in contact with me. But I think
it's cleaner than your idea. And my idea *will* be a solution for some
desired results (just not for mine: hiding things on a page so the user
can display them at will).

Michael Hamm
AM, Math, Wash. U. St. Louis
ms****@math.wustl.edu Fine print:
http://math.wustl.edu/~msh210/ ... legal.html
Jul 23 '05 #12
"me" wrote in comp.infosystems.www.authoring.html:
Do you think I will adjust my opinion to suit you in any way whatsoever?


"There are none so blind as thos who _will_ not see."

"You can lead a Usnetter to knowledge, but you cannot make him
think."

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 23 '05 #13
me
"Stan Brown" <th************@fastmail.fm> wrote in message
news:39*************@individual.net...
[snip]

After reviewing your last 15 posts I can see only two that I could in anyway
interpret as slightly helpful. If you had knowledge to share or even
something interesting to say I might listen next time. Instead of offering
criticisms why not try helping someone? If you did help someone sometime you
might be able to justify your presence here.
Signed,
me

Jul 23 '05 #14
me wrote:
"Lachlan Hunt" <sp***********@gmail.com> wrote in message
news:42**********************@per-qv1-newsreader-01.iinet.net.au...
Why should a user adjust their browser settings to
match yours in any way whatsoever?

Do you think I will adjust my opinion to suit you in any way whatsoever?


I tend to have greater respect for people who adjust their opinions when
presented with new perspectives that should provide the motivation for
doing so, and less respect for people whose opinions are fixed because,
in their view, "they're *my* opinions, dammit, and I'm not changin' them
for you or any person alive--and the facts are besides the point".
Jul 23 '05 #15
me
"Harlan Messinger" <hm*******************@comcast.net> wrote in message
news:39*************@individual.net...
[snip]
I tend to have greater respect for people who adjust their opinions when
presented with new perspectives that should provide the motivation for
doing so, and less respect for people whose opinions are fixed because,
in their view, "they're *my* opinions, dammit, and I'm not changin' them
for you or any person alive--and the facts are besides the point".


Your respect has no bearing on the expression of my opinion. If someone
offers me compelling real world perspectives I may consider them, or I may
not, either way we are entitled to our opinions.
Signed,
me
Jul 23 '05 #16

"me" <anonymous@_.com> wrote in message
news:11*************@corp.supernews.com...
"Stan Brown" <th************@fastmail.fm> wrote in message
news:39*************@individual.net...
[snip]

After reviewing your last 15 posts I can see only two that I could in anyway interpret as slightly helpful. If you had knowledge to share or even
something interesting to say I might listen next time. Instead of offering
criticisms why not try helping someone? If you did help someone sometime you might be able to justify your presence here.
Signed,
me


The regular's stock answer to this assertion is that c.i.w.a.h is not a tech
support forum.

This NG is a discussion group for HTML as it pertains to authoring for the
WWW, though one wonders how many stones are left unturned discussing
something that hasn't changed in any great way since 1997.
Jul 23 '05 #17
me
"Peter1968" <es****@nonsensebigpond.net.au> wrote in message
news:04*******************@news-server.bigpond.net.au...
"me" <anonymous@_.com> wrote in message
news:11*************@corp.supernews.com...
"Stan Brown" <th************@fastmail.fm> wrote in message
news:39*************@individual.net...
[snip]

After reviewing your last 15 posts I can see only two that I could in anyway
interpret as slightly helpful. If you had knowledge to share or even
something interesting to say I might listen next time. Instead of offering criticisms why not try helping someone? If you did help someone sometime

you
might be able to justify your presence here.
Signed,
me


The regular's stock answer to this assertion is that c.i.w.a.h is not a

tech support forum.

This NG is a discussion group for HTML as it pertains to authoring for the
WWW, though one wonders how many stones are left unturned discussing
something that hasn't changed in any great way since 1997.


Then why don't regulars suggest a more appropriate NG to those who post
questions? IMO some (many?) of the posts offer only ridicule. If the
regulars don't want to answer tech support questions then why do they bother
to respond at all?
Signed,
me
Jul 23 '05 #18
Mason A. Clark wrote:
I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript? <snip> QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?


Yes.

Does your popup appear automatically, or in response to the user
following a link? If the former, you already have a problem, not only
for people who disable JS, but also for those who have popup blockers.
In this case, you need to redesign your site to avoid these.

For popups displayed by a link, make sure you have a valid non-JS URL in
the href, so that JS-disabled browsers can access the page.

See also

http://webtips.dan.info/graceful.html

Stewart.

--
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Jul 23 '05 #19
On Mon, 07 Mar 2005 08:49:19 GMT, Mason A. Clark
<ma*******@THISix.netcom.comQQQ> wrote:
I am making a page that will depend on JavaScript.
Is this a problem: the viewers' browser not
running JavaScript?

I did a quick survey of the top of one list of
Top 500 web sites in popularity -- my javascript
turned off. Almost no problem in simply viewing
the pages but I did *not* test any dynamics.

JavaScript was used for some purpose on almost
all the pages. Only two out of thirty explicitly
demanded that javascript be turned on.

QUESTION: Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?

Mason C

I really appreciate the responses to my question.
My pop-ups are not automatic and serve a useful
purposes. However, the javascript problem has
caused me to switch to simple "<a href.." windows with
a return link at the bottom. Very simple, BUT

Now I have a new problem which I'll post in a
separate thread: how to return to different
image maps from the same page....how to know
*from whence* a page was linked.... whatever...

Thanks again for the instructive responses.

Mason C and fun to see a thread degenerate :-)

Jul 23 '05 #20
funny

I posted and a moment later looked at http://maps.google.com/
with my javascript turned off.

hummph -- they think I'll adjust my browser to suit them ?

Mason C ( i did )
Jul 23 '05 #21
Mason A. Clark wrote:
I posted and a moment later looked at http://maps.google.com/
with my javascript turned off.

hummph -- they think I'll adjust my browser to suit them ?


If you want to make use of their site,yes.

maps.google.com makes use of a newish feature in browsers in Javascript,
the XMLHttpRequest thingy... also known as "Ajax". It makes a more
interactive communication with the server possible, without leaving the
page. If you want to take advantage of it, you do need Javascript
enabled. Such is life.

Still, it'd be nice if such sites also offer Javascript-free
alternatives. Of course, user experience would be closer to the old
CGI-experience, jumping from page load to page load.

--
Bart.
Jul 23 '05 #22
On Wed, 9 Mar 2005 12:36:20 -0600, "me" <anonymous@_.com> wrote:
"Peter1968" <es****@nonsensebigpond.net.au> wrote in message
news:04*******************@news-server.bigpond.net.au...

The regular's stock answer to this assertion is that c.i.w.a.h is not a tech
support forum.
That is the usual answer when someone *demands* assistance, as opposed
to asking for it.
This NG is a discussion group for HTML as it pertains to authoring for the
WWW, though one wonders how many stones are left unturned discussing
something that hasn't changed in any great way since 1997.


Then why don't regulars suggest a more appropriate NG to those who post
questions? IMO some (many?) of the posts offer only ridicule. If the
regulars don't want to answer tech support questions then why do they bother
to respond at all?


A very great deal of assistance has been and is given via this forum.
When ridicule is offered by the regulars it is usually deserved (no, not
always, but usually.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 23 '05 #23

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

Similar topics

3
by: ted holden | last post by:
Dumb question... Does PHP have any facility for utilizing flash, shockwave, quicktime, or any such media viewer from inside some browser application?
0
by: _Doug | last post by:
I'm trying to do a simple Crystal report from a simple text data base, and get: Access to the path "C:\\Program Files\\Microsoft Visual Studio .NET\\Crystal Reports\\Viewers\\dynamic_images" is...
2
by: jason | last post by:
Hello, Does anyone have any experience with 3rd Party Crystal Report viewers? I'm looking for a viewer that allows me to view reports in our web app without having crystal reports installed on the...
10
by: hughestroop | last post by:
I have updated my CSS and if you view the main page with the old css cached, it breaks the page. Is there any way to force viewers that have the old css cached to get the new css? Our viewers...
0
by: sriii | last post by:
Hi All, I want to generate a report for one application by using the Active Reports. Any body please Explain me the What is the use of viewers in details. Thanx in Advance.
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.