At 4:54 AM -0800 1/10/07, Jürgen Wind wrote:
----8<---- [source of index]
<noscript>
 <meta http-equiv='refresh' content='0;url=jstest110.php?js=no'>
 <?php /*** or put here your complete page for browsers with js disabled
***/ ?>
</noscript>
----

Nice -- now instead of two different pages (i.e., index.php, jstest110.php) , make it one.

Here's my solution:  <http://www.sperling.com/js_detect3/>

<?php
if (!isset($_GET['js']))
{
echo("<script type='text/javascript'>location.href='index.php?js=ok';</script>");
}
else
{
$js  = $_GET['js'];
if($js != "ok")
{
$js = "no";
}
}
?>

Now, depending upon the value of $js, do whatever.

It would be cool if I could send js value via a POST instead of GET-- can that be done?

tedd

PS: I read somewhere that using <noscript> is not recommended.
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to