NYCPHP Meetup

NYPHP.org

[nycphp-talk] detecting Java Script from within a PHP script.

tedd tedd at sperling.com
Mon Nov 19 16:26:25 EST 2007


At 9:00 AM -0500 11/16/07, Urb LeJeune wrote:
>	Sorry about the last message, I accidently hit the send button.
>
>	It there a way to detect if a user's browser has Java Script enabled
>from within a PHP script?
>
>Urb
>

No.

PHP runs before the browser/javascript does.

Having php determine if the browser has js enabled means 
communication from the browser back to the script.

You could do this communication via ajax. Namely, have php prepare a 
web page, have the web page determine if js in enabled and then 
communicate back to a php script to continue your second script.

However, if js is not enabled, then your second script will never 
hear back from the browser.

Cheers,

tedd


-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list