img onload broken in IE?

Giganews Newsgroups
Subject: img onload broken in IE?
Posted by:  rabbits… (rabbits77)
Date: 8 Jul 2003

I have the following:
        <script TYPE="text/javascript" LANGAUGE="JavaScript">
        function swap (imgID,imgSrc) {
        <img ID=19 ONLOAD="swap(19,'images/SecondImage.gif')"

What is supposed to happen is that FirstImage.gif is to be shown and a
call to swap() is made to get SecondImage.gif. While SecondImage.gif
is being generated(in real life it is a dynamically generated image,
not a simple plain gif file) The FirstImage.gif is shown. In
Netscape/Mozilla this works great!! In IE (v5+) What I get is many
repeated calls for SecondImage.gif, as if I have generated some sort
of infinite loop. I have tried changing the swap() function to set the
onload attribute as follows:
  function swap (imgID,imgSrc) {

        function noop(){

Hoping I could trick IE somehow and to a certain extant this works,
after the initial reuqest for SecondImage.gif there are no more,
however, now FirstImage.gif never shows up in IE!! This revision to
the javascript does not bother NS, it continues to work perfectly
Any insite into this? Any advice at this point would be very much