The built-in browser object "Image" is sometimes reported as undefined on pages viewed in IE. I've done extensive research online, but all leads point to browser addons/plugin in combination of calling that page in a pop-up window as the likely culprit. No solutions were found and I'm feeling that none were ever offered.
This error seems to be triggered by the JavaScript expression, "new Image" as in the following statement:
var myImage = new Image();
I'm stumped. Why would IE complain about a built-in object? It doesn't make sense.
I have the same problem i have made an image gallery with next button and when i click this text is load here is the code,please help:
string=0;
images=new Array();
images[0]=”5.jpg”;
images[1]=”bild.jpg”;
images[2]=”a.jpg”;
preload=new Array(3)
for(i=0;i<images.lenght;i++){
preload[i]=new Image(120,120)
preload[i].src=images[i]
}
function Number() {
pet=document.getElementById("id");
pet.innerHTML="image" + eval(string+1) +"of" + images.lenght;
}
function Next() {
if(string<images-1) {
string=string+1
document.pas.src=preload[string].src
}
else{
alert("something gone wrong")
}
Number();
}