1. zamtools
  2. StackTack
  3. Issues
Issue #5 resolved

Unable to Display StackTack in IE8

Anonymous created an issue

Hi, when I view my blog in IE8, the StackTack question is not displayed. A JavaScript error is reported by the browser (see attached). The error details are as follows:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E) Timestamp: Wed, 25 Aug 2010 22:32:11 UTC

Message: Object doesn't support this property or method Line: 1 Char: 1231 Code: 0 URI: http://app.stacktack.com/jquery.stacktack.min.js

I looked at the relevant section of code in the StackTack plugin code, and it is breaking on this IF statement:

if(e.indexOf(classTokens[0].toLowerCase())>-1){ ... }

A quick Google reveals that Internet Explorer (including version 8) does not support indexOf for arrays (http://stackoverflow.com/questions/2608575/jquery-split-and-indexof-results-in-object-doesnt-support-this-property-or-me). One of the answers indicates that adding a reference to the Prototype library can overcome this issue. So when I change the header statements to be:

<script src='http://ajax.googleapis.com/ajax/libs/prototype/' type='text/javascript'/> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'/> <script src='http://app.stacktack.com/jquery.stacktack.min.js' type='text/javascript'/> <script type='text/javascript'> $(document).ready(function() { $(document).stacktack(); }); </script>

,the issue is resolved, and the question and answers display correctly.

Comments (1)

  1. Log in to comment