Saturday, April 27, 2024
44
rated 0 times [  46] [ 2]  / answers: 1 / hits: 43730  / 15 Years ago, thu, june 4, 2009, 12:00:00
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?


More From » internet-explorer

 Answers
6

Figured it out.



Turns out Internet Explorer chokes if you use anything other than javascript in the language attribute of the script tag.



I was using version numbers appended onto javascript in the language attribute, which was causing IE not to load prototype.js.


[#99385] Monday, June 1, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
amari

Total Points: 736
Total Questions: 111
Total Answers: 90

Location: Saint Pierre and Miquelon
Member since Fri, Jan 28, 2022
2 Years ago
;