On 11/16/07, Urb LeJeune <[EMAIL PROTECTED]> wrote:

>         It there a way to detect if a user's browser has Java Script enabled
> from within a PHP script?

This might work:

<script type="text/javascript">
if ( !window.location.search ) {
  window.location = window.location.href+"?js=1";
}
</script>

Look for $_GET['js'] in your script. Note the conditional, which won't
check for js if there are any get vars.

Not tested in an actual browser, so ymmv. I bet setting a cookie value
would be more reliable...
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to