Loading ...
Sorry, an error occurred while loading the content.

Detecting whether browser supports JavaScript and whether it is enabled

Expand Messages
  • Omar Al Zabir
    There are 2 scenerios that you need to consider: 1. Whether the browser is JS compatible 2. Whether Internet Security zone has disabled JS. (Windows 2003
    Message 1 of 1 , Jun 30, 2005
    • 0 Attachment
      There are 2 scenerios that you need to consider:

      1. Whether the browser is JS compatible
      2. Whether Internet Security zone has disabled JS. (Windows 2003 Internet
      Explorer Configuration disables JS to some level)

      In order to be sure that javascript really works, try this:

      1. In your home page, use Java Script to redirect to the same page using
      additional parameter like this:

      document.location.href = document.location.href + "?JavaScriptEnabled=true";

      From PHP, check the request variable:

      if( $_REQUEST["JavaScriptEnabled"] == "true" )

      If JavaScript is not enabled, the redirection will not occur. So, you can
      generate 2 version of your page, one which utilizes javascript when the
      request value is available and the other which does not use javascript.
    Your message has been successfully submitted and would be delivered to recipients shortly.