Reputation: 2085
I've run into a strange Internet Explorer 8 issue.
I have the following Javascript:
var img = new Image();
img.src = "http://something.com/images/something.gif";
It works just fine when I'm running it in its own window but when it's run in a pop up window it fails saying 'Image is not defined'. This only happens in Internet Explorer. I'm curious to know if anyone has encountered this and how I might work around it.
Thanks!
Upvotes: 1
Views: 4257
Reputation: 344585
If you don't get it working, you can resort to creating the img tag with createElement instead.
var img = document.createElement("img");
img.src = "http://something.com/images/something.gif";
Upvotes: 4