Issue #5 resolved

Unable to Display StackTack in IE8

Andy Parkhill
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:

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 ( 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='' type='text/javascript'/> <script src='' type='text/javascript'/> <script src='' 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