Wednesday, December 3, 2008

Look Mom! My First IE Specific Javascript Bug

As if IE's bad CSS implementation was not enough, the browser loves kicking a Javascript novice in the balls as well. After spending a fair number of hours reducing 5 pages to one with Javascript and jQuery - what do I run into - IE6 with the very cryptic 'Errors on page' error.

A hour of further inspection revealed that IE6 (and apparently even IE7) do not support the indexOf method for an array! http://www.htmlgoodies.com/primers/jsp/article.php/3624446

Thank God for jQuery. http://docs.jquery.com/Core/index#subject [There is catch to the index method in jQuery though and it is slightly different from the indexOf method - I remember running into such an issue - but can't quite recall what exactly it was - just a note to myself so that I look it up.]