Jump to content

How to check whether javascript enable or decable via code..?


vijay
 Share

Recommended Posts

Hi.. How can we check whether javascript is enabled or decabled with the help of any server script or any other way.. ? (except changing IE/Firefox 's settings from internet option) Thanks in advance...!Regards,Vijay

Link to comment
Share on other sites

PHP cannot detect the presence of Javascript. You would need to use AJAX or something like that to send a request to the server, if the request comes in then Javascript works!
Didn't you (justsomeguy) have an example of something like this on one of these posts a week or two ago. Adapted from that, the javascript tester could look something like this:
<script type="text/javascript">var test = new Image();test.src = "jsEnabled.php";</script>

If jsEnabled.php is requested, then javascript is enabled.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...