[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How do I tell if Javascript is enabled or disabled on IE v8

Posted on 2014-08-25
Medium Priority
Last Modified: 2014-08-25
How do I tell if Javascript is enabled or disabled on IE v8

What path do I take?
Question by:Anthony Lucia
  • 2
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40283962
You have to assume that it is disabled and see that it is enabled only if your test script runs.  After all, if it is disabled, there is nothing to report it's condition.

Author Comment

by:Anthony Lucia
ID: 40284042
I am getting the following error:

Javascript "void 0"

Open in new window

I looked up the error on a firum, which said to

1> Ensure the Pop-up blocker is off

2> Ensure the Javascript otpion is enabled

Open in new window

I have done the first, and wish to do the second

How can I ensure the that javascript option is enabled?
LVL 84

Accepted Solution

Dave Baldwin earned 1000 total points
ID: 40284188
In Internet Options on the Security tab for Internet, click on Custom and look for Scripting and Active Scripting under that to be set to 'Enable'.
LVL 84

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 1000 total points
ID: 40284204
save as javatest.html and run it in your browser
<meta name="description" content="JavaScript Tester">
<meta name="keywords" content="JavaScript, Tester">
<title>JavaScript Test</title>
<script type="text/javascript">  var jsvers = "*could not detect*" </script>
<script type="text/javascript">   jsvers="1.0" </script>
<script type="text/javascript1.1"> jsvers="1.1" </script>
<script type="text/javascript1.2"> jsvers="1.2" </script>
<script type="text/javascript1.3"> jsvers="1.3" </script>
<script type="text/javascript1.4"> jsvers="1.4" </script>
<script type="text/javascript1.5"> jsvers="1.5" </script>
<script type="text/javascript1,6"> jsvers="1.6" </script>
<script type="text/javascript1.7"> jsvers="1.7" </script>
<script type="text/javascript1.8"> jsvers="1.8" </script>
<script type="text/javascript1.9"> jsvers="1.9" </script>
<script type="text/javascript2.0"> jsvers="2.0" </script>
<script type="text/javascript2.1"> jsvers="2.1" </script>
<script type="text/javascript2.1"> jsvers="2.2" </script>
<table cellSpacing="0" cellPadding="7" align="center" style="margin-top:30px;">
			<td align="center" style="background-color:#616EA4; color:white; font-weight:bold; font-size:110%;" >Test Results</td>
			<td align="center" style="background-color:#D1E3F9;  padding:24px;
         border-left:3px solid #616EA4; border-right:3px solid #616EA4; border-top:3px solid #616EA4;">
			<span style="background-color:green; padding-top:8px; padding-bottom:8px;">
      <script type="text/javascript">
  	    document.write (" &nbsp; JavaScript &nbsp; <b>IS WORKING</b> &nbsp; in your web browser &nbsp;" );
      	  <noscript>&nbsp; JavaScript <b>IS NOT WORKING</b> in your web browser &nbsp; 
			<td style="background-color:#E9F0FA; border-left:3px solid #616EA4; padding-left:12px; padding-right:12px;
   border-right:3px solid #616EA4; border-bottom:3px solid #616EA4; line-height:200%;">
			<noscript>Either your web browser is not capable of supporting JavaScript at all &nbsp; -or-<br>
    the use of JavaScript has been purposely disabled.<br>
 <script type="text/javascript">
  document.write ("Your web browser supports JavaScript version " + jsvers) ;

 <script type="text/javascript">
 var detectedb = "not";
 if (window.opera) {detectedb = "Opera";}
 if (navigator.userAgent.indexOf("Firefox")!=-1){
       var endofff = navigator.userAgent.indexOf("Firefox")+8;
       detectedb = "Firefox";                  }
 if (navigator.userAgent.indexOf("MSIE")!=-1) {detectedb = "IE";}
 if (navigator.userAgent.indexOf(" Chrome/")!=-1){
       var endofChrome = navigator.userAgent.indexOf(" Chrome/")+8;
       detectedb = "Chrome";                     } //added Feb 28, 2010
 var uagentlowercase = navigator.userAgent.toLowerCase(); //force lower case
 if (uagentlowercase.search("blackberry") > -1)
 	 {detectedb = "BlackBerry";}   // added June 2, 2010
 var msg="<br>Your web browser is ";
 if (detectedb=="Opera")  {msg=msg+"Opera";}
 if (detectedb=="Firefox"){msg=msg+"Firefox version " + navigator.userAgent.substring(endofff,endofff+7);}

 if (detectedb=="IE")
 {msg=msg+"Internet Explorer ";
  if  (document.documentElement && typeof document.documentElement.style.maxHeight!="undefined")
// Is it IE7 or IE8 or IE9?
// {msg=msg+"7";}  old code, this used to only detect IE7, now it also wrongly detects IE8
   {if (navigator.userAgent.indexOf("MSIE 7.0") != -1) msg=msg+"version 7";
    if (navigator.userAgent.indexOf("MSIE 8.0") != -1) msg=msg+"version 8";
    if (navigator.userAgent.indexOf("MSIE 9.0") != -1) msg=msg+"version 9"; }
      if (document.compatMode && document.all){msg=msg+"version 6";}
      else  if (window.attachEvent){msg=msg+" version 5";}
 if (detectedb=="Chrome")
    {msg=msg+"Chrome version " + navigator.userAgent.substring(endofChrome,endofChrome+10);}
 if (detectedb=="BlackBerry")
    {msg=msg+"a BlackBerry of some type";}

 if (detectedb=="not")
      {document.write ("<br>Your web browser was not detected as being either Opera, Firefox, Internet Explorer, Chrome or a BlackBerry");}
 else {document.write (msg);}
	<p>Every web browser identifies itself to websites with a character string called the "user agent". The User
Agent string for your web browser is:</p>
	<p style="font-family:courier;">
<script type="text/javascript">
  document.write (navigator.userAgent);
	<script type="text/javascript">This function requires JavaScript.
	<p class="screenonly">&nbsp;</p>
	<p class="screenonly">&nbsp;</p>

Open in new window


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question