assigning onload event to an image created with JavaScript doesn't work

David Joham djoham at yahoo.com
Wed Nov 6 18:59:16 GMT 2002


Hello all,

I'm using Konq 3.01 at the moment at work and I've noticed that onload events assigned via
Javascript to Image objects don't seem to work. I'm trying to track this down to get the new HP
site working in Konq.

Here's a small recreation that demonstrates the problem:

<html>
<body>
I should get an alert box in a minute
</body>
</html>
<script type="text/javascript">
	var x = new Image();
	x.src = "http://images.slashdot.org/title.gif";
	x.onload = doalert;

function doalert() {
	alert("I'm loaded");
}
</script>

In Mozilla, the above testcase fires the alert when the image is loaded. I presume the same
happens for IE. Konq, however, does not fire the alert.

Would someone who is running a 3.1 RC please test this and see if the behavior is the same for the
3.1 version of Konq? If it is, I'll file a bug. If not, then I won't waste any more time on this.

Thanks in advance

David

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/




More information about the kfm-devel mailing list