Javascript about to be disabled event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Swift

    Javascript about to be disabled event

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

    --
    Steve Swift


  • Luke Yan

    #2
    Re: Javascript about to be disabled event

    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.ringers.org.uk

    Comment

    • Jeremy J Starcher

      #3
      Re: Javascript about to be disabled event

      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.

      Comment

      • Swifty

        #4
        Re: Javascript about to be disabled 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.

        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.

        --

        Comment

        • Lasse Reichstein Nielsen

          #5
          Re: Javascript about to be disabled event

          Swifty <Steve.J.Swift@ 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.'

          Comment

          • Dr J R Stockton

            #6
            Re: Javascript about to be disabled event

            In comp.lang.javas cript message <27e65092-da38-4a6a-a332-1f777cf15e87@h6
            0g2000hsg.googl egroups.com>, Tue, 30 Sep 2008 22:39:45, Swifty
            <Steve.J.Swift@ 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)

            Comment

            Working...