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

Home Posts Topics Members FAQ

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 2713
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...@gmai l.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...@gmai l.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/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Oct 1 '08 #5
In comp.lang.javas cript message <27e65092-da38-4a6a-a332-1f777cf15e87@h6
0g2000hsg.googl egroups.com>, Tue, 30 Sep 2008 22:39:45, Swifty
<St***********@ gmail.composted :
>On 30 Sep, 01:40, Luke Yan <gumpag...@gmai l.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.demo n.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
3338
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 arbitrary data structure. I'd like to do the same with javascript. print Data::Dumper(document)
6
7742
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. Because I don't want a post-back, I added some javascript to do this However, using client-side JS, I cannot enable any controls that have been disabled by server-side code. If the control is initially enabled, I can disable/enable it client-side.
4
2797
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 will be uploading files that are between 1 and 2 Meg. in size, and they are not too knowledgeable about computers. I want to disable the form buttons so they can't hit them after they hit the "upload" button. We're trying to prevent them from...
26
11083
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 surrounding the use of Javascript. The site currently relies on Javascript for navigating from page to page - I cannot find anything in the 508 guidelines like the 6.3 WAI checkpoint for AA compliance: "Ensure that pages are usable when scripts,...
10
2469
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 additional user interaction. I found some timer stuff in js but it had to do with delays and not what I was really looking for. Thank you in advanced.
6
1911
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 allow the user to type in a value. Also, I would like the 2nd option only editable if the button for that option is selected. All I can seem to find is basic examples of forms, and none of which have this feature. The form would look something...
24
6342
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 have on his site, a Javascript Calculator for working out the cost of what they want, for example: 1 widget and 2 widglets = £5.00
2
7718
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 submit button to submit a form that contains one or two Mileposts: 1) If a Milepost range larger than 5 miles is entered, I would like to pop up a confirmation box to confirm the range.
13
1855
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 form to it... ill post the code for you to look at and try to explaine in detail what im trying to do. here is the code (HTML and Javascript so you get the whole picture): Javascript: var gen, lights; var lammount;
0
9685
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
9533
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
10461
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
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...
0
10019
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
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...
0
6796
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.