I cannot seem to figure out I am getting the following error in IE 8 (only IE version I’ve tested so far). The script runs fine in all (chrome, ff, safari) other browsers I’ve tested. What am I doing wrong?
Error:
Message: Object doesn’t support this property or method
Line: 52
Char: 29
Code: 0
URI: http://www.ntierdesign.com/jquery/livetwitter/Scripts/jquery.liveTwitter.js
Message: Object doesn’t support this property or method
Line: 1
Char: 1
Code: 0
URI: http://twitter.com/status/user_timeline/bloomsdayreg.json?count=3&callback=jsonp1251868075768&_=1251868075882
Example:
Hopefully I won’t cap out my twitter api rate limit too fast, but you can view an example of the page here
http://ntierdesign.com/jquery/livetwitter/
You are having this error because the version of IE that you are using doesn’t implements Array/indexOf, which has been introduced in JavaScript 1.6.
However you could add the indexOf method to the Array prototype if it doesn’t exists, for compatibility.
This is the implementation that Firefox uses internally:
Check with IE this example of your page, having the compatibility function added, runs without problems…