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

Javascript about to be disabled event

Is there an event which is triggered when JavaScript is about to be
disabled?

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Sep 29 '08 #1
5 2693
but if javascript is disabled, there will be no events any more. :)

while the tag "<noscript>" will be rendered under such case

thanks
luke

Steve Swift wrote:
Is there an event which is triggered when JavaScript is about to be
disabled?

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Sep 30 '08 #2
On Mon, 29 Sep 2008 17:40:11 -0700, Luke Yan wrote:
but if javascript is disabled, there will be no events any more. :)

while the tag "<noscript>" will be rendered under such case

thanks
luke
not always. Some times Javascript is filtered out at the firewall while
the browser itself does have Javascript enabled.

Thus, no Javascript and yet, no "<noscript>" processing.
Sep 30 '08 #3
On 30 Sep, 01:40, Luke Yan <gumpag...@gmail.comwrote:
but if javascript is disabled, there will be no events any more. :)
Ah, but it isn't disabled yet, but it soon will be, hence "about to
be". The user has told the browser to disable Javascript, but it
hasn't disabled it yet.

In my webpage, a few controls have been disabled by previous
Javascripted events. If the user now disables Javascript, they will no
longer be able to use the page fully, as if it had been loaded with
JavaScript disabled, so I'd like there to be an event which the
browser triggers, which runs my "about to be disabled" code, then it
disabled Javascript.

Unfortunately, I don't think there is such an event.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Oct 1 '08 #4
Swifty <St***********@gmail.comwrites:
On 30 Sep, 01:40, Luke Yan <gumpag...@gmail.comwrote:
>but if javascript is disabled, there will be no events any more. :)

Ah, but it isn't disabled yet, but it soon will be, hence "about to
be". The user has told the browser to disable Javascript, but it
hasn't disabled it yet.
My guess is that that event is so rare that nobody has bothered
worrying about it.
If someone has Javascript disabled, they usually has it disabled
all the time. New pages are loaded with Javascript off.
In my webpage, a few controls have been disabled by previous
Javascripted events. If the user now disables Javascript, they will no
longer be able to use the page fully, as if it had been loaded with
JavaScript disabled, so I'd like there to be an event which the
browser triggers, which runs my "about to be disabled" code, then it
disabled Javascript.
People disabling Javascript on a running page expect things to break.
They'll just have to reload the page.
Unfortunately, I don't think there is such an event.
Neither do I, although I don't think it's unfortunate. It would create
an expectation that pages should be able to adapt to scripting being
disabled, which isn't really reasonable.

/L
--
Lasse Reichstein Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Oct 1 '08 #5
In comp.lang.javascript message <27e65092-da38-4a6a-a332-1f777cf15e87@h6
0g2000hsg.googlegroups.com>, Tue, 30 Sep 2008 22:39:45, Swifty
<St***********@gmail.composted:
>On 30 Sep, 01:40, Luke Yan <gumpag...@gmail.comwrote:
>but if javascript is disabled, there will be no events any more. :)

Ah, but it isn't disabled yet, but it soon will be, hence "about to
be". The user has told the browser to disable Javascript, but it
hasn't disabled it yet.
Rather than expecting JavaScript to be formally disabled while the page
is being viewed - and is there a guarantee that all browsers will make
that effective on the current page, rather than just reading the bit at
page load - why not make all event handlers equivalent to "return false"
(insert "if (NoScript) return false;" in each) or, if possible, put a
transparent div over everything that will catch the events? You can
then, if wished, allow one particular event to enable the others.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "" (SonOfRFC1036)
Oct 1 '08 #6

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

Similar topics

14
by: horos | last post by:
hey all, I'm a heavy perl user, not so much a java script user, and was wondering... perl has an extremely nice utility called Data::Dumper, which allows you to dump out the contents of an...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
4
by: Mark Miller | last post by:
I've been trying to execute a javascript function just before submit on a form that contains an <input type="file"> input field and it isn't working. The reason I want to do this is the end users...
26
by: wardy | last post by:
Hi all, looking for a little bit of help.....I'm currently in the process of trying to understand the impact of the 508 guidelines on a web site that I am involved with, and I have a question...
10
by: jason_box | last post by:
Hello, I was wondering if there was a way to have a javacript be activated by an input button that would call to a cgi program and querey every 10minutes and the cgi would update the page without...
6
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to...
24
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to...
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
13
by: DDragon | last post by:
ok here is the problem, i have to forms which have values i wish to be added together i can add together the values in one form all right but im having problems with adding the values of the other...
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...
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
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
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,...
0
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...

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.