checking if JavaScript is turned on...

Discussion in 'Javascript' started by Mel, Feb 1, 2004.

  1. Mel

    Mel Guest

    can you help me with this ?

    i need to know if javascript is enabled on the user's browser

    thanks for your help

    Mel
     
    Mel, Feb 1, 2004
    #1
    1. Advertising

  2. Mel wrote:

    > can you help me with this ?
    >
    > i need to know if javascript is enabled on the user's browser


    <script type="text/javascript">
    function jsenabled() {
    return true;
    }
    </script>

    That will return true is JS is enabled.

    Something tells me that this won't help very much. Maybe if you put the
    question in context I could offer a more practical suggestion.

    --
    David Dorward <http://dorward.me.uk/>
     
    David Dorward, Feb 1, 2004
    #2
    1. Advertising

  3. Mel wrote:
    > can you help me with this ?
    >
    > i need to know if javascript is enabled on the user's browser
    >


    Just put the following in the head section of your document:

    <script type="text/javascript">
    location.href = "js-enabled.html";
    </script>

    When JS has been disabled, the visitor won't be redirected...


    JW
     
    Janwillem Borleffs, Feb 1, 2004
    #3
  4. In article <59812$401d2dbe$44a7759e$>,
    says...
    > can you help me with this ?
    >
    > i need to know if javascript is enabled on the user's browser
    >

    Think about that for a minute. What are you going to do once you've
    determined whether it is or not?

    --
    Hywel I do not eat quiche
    http://hyweljenkins.co.uk/
    http://hyweljenkins.co.uk/mfaq.php
     
    Hywel Jenkins, Feb 1, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mrcakey
    Replies:
    4
    Views:
    328
    freemont
    Sep 5, 2007
  2. Lord Merlin
    Replies:
    0
    Views:
    679
    Lord Merlin
    Apr 11, 2004
  3. Peter
    Replies:
    11
    Views:
    167
    Don Grover
    Mar 2, 2004
  4. Gernot Frisch
    Replies:
    10
    Views:
    235
    Michael Winter
    Apr 21, 2004
  5. Kenjis Kaan
    Replies:
    4
    Views:
    185
    Tad McClellan
    Sep 3, 2003
Loading...

Share This Page