'Object Expected' Javascript error in IE8 when using prototype.js

Posted by Charlie Somerville on Stack Overflow See other posts from Stack Overflow or by Charlie Somerville
Published on 2009-06-04T09:17:27Z Indexed on 2010/03/24 23:03 UTC
Read the original article Hit count: 1117

function icPageInit()
{
    $("icImgDiv" + icAlternate()).setOpacity(0);
    return true;
}
window.onload = icPageInit;

This piece of Javascript code works fine in Firefox and Chrome, but fails with the error 'Object Expected' in Internet Explorer 8. IE8 says the error occurs on line 3 of the above code.

Does anyone know why this is happening, and/or how to get it working?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ie8