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.
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.'
>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)
Comment