#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Tomsk
    Posts
    1
    Rep Power
    0

    Exclamation javascript detection


    How can I detect (with PHP) that the surfer has javascript turned ON?

    Regards
  2. #2
  3. No Profile Picture
    Divine Wind
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Mongo
    Posts
    24
    Rep Power
    0

    Re: javascript detection


    Originally posted by spidertrapper
    How can I detect (with PHP) that the surfer has javascript turned ON?
    I don't think you can. You can use PHP to see if the browser is PHP capable and this is useful for that:

    PHPBuilder

    and then use <NOSCRIPT> tags to tell them to switch it on. You can then ask non-JavaScript capable surfers to come back with a more up to date browser (it would be handy if you had an 'update browser' page with links to IE and NS [and Opera] to direct them to.

    That's what I'd do anyway.

    Emps
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    6
    Rep Power
    0
    Put this on top of your php-page.

    if ($javascript=''){echo("
    <form action"your_php" name="your_form">
    <input type="hidden" name="javascript" value="no">
    </form>

    <script language="Javascript">
    <!--
    document.your_form.javascript.value="yes";
    document.your_form.submit();
    //-->
    </script>
    ");}

    If the user has javascript, $javascript = "yes".

IMN logo majestic logo threadwatch logo seochat tools logo