473,230 Members | 1,448 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,230 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 2677
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.