#1
  1. Cobol Victim
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Munich, GER
    Posts
    124
    Rep Power
    13

    Check if Javascript is enabled


    How can I check if Javascript is enabled?
    I have an idea for a workaround, but is there a simple way to check it (with a function that returns a boolean variable or the like)?

    If not i 'd do this:
    Forward the user via Js, if it's not enabled the user stays on the current page and has to proceed manually.

    Like this:
    ...
    <script language='javascript'>location.href='indexJS.php'</script>
    <p>Your Browser does not support Javascript<a href='indexnoJS.php'> Click here </a></p>
    ...



    Thanks
    Lebowski: Isn't that what makes a man?
    Dude: Mmm, sure. That and a pair of testicles.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Bavaria, Germany
    Posts
    140
    Rep Power
    12
    If client side scripting is disabled you can't execute any function and therefore don't have any method for retrieving any bool return code ;-).

    Yeah, that's nearly the same we use at our projects, redirecting the user with a javascript, or write out a div layer with "Please enable your javascript" and just hide it with a javascript statement (which is execute if javascript is turned on).
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Barcelona
    Posts
    133
    Rep Power
    13
    the noscript tag is there for smth
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Bavaria, Germany
    Posts
    140
    Rep Power
    12
    Originally posted by meddle
    the noscript tag is there for smth
    Yeah, you're right - but it isn't as 3l33t as the javascript solution :-P

IMN logo majestic logo threadwatch logo seochat tools logo