I
inevercheckthisaddress
I can't get Opera to fire an event when an image object's src has
loaded. The test code I'm using is this -
---------------------------------
window.onload=go
function yo() {
alert("yo");
}
function go() {
//alert("go?");
var pic=new Image();
pic.onload=yo; // method 1
//pic.addEventListener("load",yo,false); // method 2
pic.src="serenity.jpg";
}
---------------------------------
Code is in a file on it's own referenced from the xhtml. Using either
of the two methods indicated the function yo doesn't get called.
Code works as expected in Firefox, Mozilla, Konqueror, IE. If I
uncomment the alert in go() I can see that go does actually get called.
Nothing comes up in Opera's Javascript console.
Opera 7.54 on Linux, if that makes a difference.
Am I doing something wrong here?
thanks,
mike
loaded. The test code I'm using is this -
---------------------------------
window.onload=go
function yo() {
alert("yo");
}
function go() {
//alert("go?");
var pic=new Image();
pic.onload=yo; // method 1
//pic.addEventListener("load",yo,false); // method 2
pic.src="serenity.jpg";
}
---------------------------------
Code is in a file on it's own referenced from the xhtml. Using either
of the two methods indicated the function yo doesn't get called.
Code works as expected in Firefox, Mozilla, Konqueror, IE. If I
uncomment the alert in go() I can see that go does actually get called.
Nothing comes up in Opera's Javascript console.
Opera 7.54 on Linux, if that makes a difference.
Am I doing something wrong here?
thanks,
mike