How to detect if JavaScript is switched off

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dilantha Seneviratne

    #1

    How to detect if JavaScript is switched off

    Hi
    Could someone advice me on how I detect if JavaScript is switched
    off from a browser.

    thanks

  • Dennis M. Marks

    #2
    Re: How to detect if JavaScript is switched off

    I have read the following message from Dilantha Seneviratne
    <dilantha.senev iratne@caris.co m>
    and have decided to lend my vast knowledge.

    The writer said:[color=blue]
    > Hi
    > Could someone advice me on how I detect if JavaScript is switched
    > off from a browser.
    >
    > thanks
    >
    >[/color]

    and my reply is:
    <noscript>
    This line will display if there is no javascript
    </noscript>

    --
    Dennis M. Marks

    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

    Comment

    • Randy Webb

      #3
      Re: How to detect if JavaScript is switched off

      Dennis M. Marks wrote:
      [color=blue]
      > I have read the following message from Dilantha Seneviratne
      > <dilantha.senev iratne@caris.co m>
      > and have decided to lend my vast knowledge.
      >
      > The writer said:
      >[color=green]
      >>Hi
      >> Could someone advice me on how I detect if JavaScript is switched
      >>off from a browser.
      >>
      >>thanks
      >>
      >>[/color]
      >
      >
      > and my reply is:
      > <noscript>
      > This line will display if there is no javascript
      > </noscript>
      >[/color]

      Or:

      <script type="text/javascript">
      document.locati on.href="jsEnab led.html";
      </script>
      <body>
      If you read this, 100-1 Javascript is disabled
      </body>

      --
      Randy
      Chance Favors The Prepared Mind
      comp.lang.javas cript FAQ - http://jibbering.com/faq/

      Comment

      • Richard Cornford

        #4
        Re: How to detect if JavaScript is switched off

        "Dilantha Seneviratne" <dilantha.senev iratne@caris.co m> wrote in message
        news:40312B96.B 0052E3D@caris.c om...[color=blue]
        > Could someone advice me on how I detect if JavaScript
        >is switched off from a browser.[/color]

        It is unclear whether you are interested in detecting if a browser is
        incapable of executing javascript or whether it is a browser that could
        execute javascript but on which it has been disabled. It probably
        doesn't matter in practice, as there won't be any way of telling the two
        apart.

        A test is only useful if you can do something with the result, and
        without the ability to execute scripts there is nothing you can do in
        response to the inability to execute scripts.

        It is also the case that an ability on the part of a browser to execute
        javascript does not mean that any given script will successfully execute
        on that browsers.

        Richard.


        Comment

        Working...