Forum Moderators: coopster

Message Too Old, No Replies

Can PHP directly detect if JavaScript would work?

         

Jeremy_H

12:34 am on Jun 9, 2006 (gmt 0)

10+ Year Member



Can PHP directly detect if the client can view JavaScript?

I'm trying to avoid any two step process, like if page 1 sets a cookie using JavaScript and page 2 reads the cookie via PHP.

I know if there was a solution, it probably wouldn't be 100% accurate, and that's fine, but something would be a lot better for me then nothing.

Thanks for any input

eelixduppy

2:39 am on Jun 9, 2006 (gmt 0)



Could you maybe just use the <script> and <noscript> tags to accomplish your task?

Habtom

5:07 am on Jun 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



//Can PHP directly detect if the client can view JavaScript?

Not the first time it runs. PHP is a server side script, and won't know much about what is happening on the client side. But I think there could be a way to send a second HTTP request and find out javascript status on the client's machine.

Habtom