tags:

views:

177

answers:

2

Is there any way to enable JavaScript on the client machine using PHP?

+13  A: 

You can't do such a thing. It's impossible to modify user preferences stored on their local machines.

You can ask them to enable javascript if it's not the case using the noscript tag.

marcgg
+4  A: 

No, as neither the HTTP protocol or HTML have a feature to do this. To have a website able to enable JavaScript would also be a breach of security. There is also no guarentee that the users browser has JavaScript.

You may wish to look at the <noscript> tags, which allow you to display a message to the user when JavaScript is not active.

Yacoby