mkosmosports Posted December 30, 2006 Share Posted December 30, 2006 Is there a way I can use php to check if the user has javascript turned on or off. My final goal would be to write a condition saying if javascript is turned on do this and if its turned off do that.Any help appreciated.Thanks. Link to comment https://forums.phpfreaks.com/topic/32286-checking-if-javascript-is-turned-on-or-off/ Share on other sites More sharing options...
dbo Posted December 30, 2006 Share Posted December 30, 2006 Not exactly.What you can do is a redirect with javascript. If the redirect works you set a session variable and redirect back to the page you were just at to continue processing. If the session variable is set you know javascript was enabled and you can continue. If the session variable isn't set then javascript isn't enabled and you can act however you wish. Link to comment https://forums.phpfreaks.com/topic/32286-checking-if-javascript-is-turned-on-or-off/#findComment-149852 Share on other sites More sharing options...
mkosmosports Posted December 30, 2006 Author Share Posted December 30, 2006 Hmmm...I see. I was hoping there would be an easier way to do that...:)Thanks. Link to comment https://forums.phpfreaks.com/topic/32286-checking-if-javascript-is-turned-on-or-off/#findComment-149853 Share on other sites More sharing options...
dbo Posted December 30, 2006 Share Posted December 30, 2006 If you find a better solution let me know. Something I've recently had to deal with when handling some Ajax pages. Link to comment https://forums.phpfreaks.com/topic/32286-checking-if-javascript-is-turned-on-or-off/#findComment-149856 Share on other sites More sharing options...
mkosmosports Posted December 30, 2006 Author Share Posted December 30, 2006 Thats exactly what Im trying to do. Ill let you know if I find out some more... Link to comment https://forums.phpfreaks.com/topic/32286-checking-if-javascript-is-turned-on-or-off/#findComment-149858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.