I have a subroutine that inserts image objects into
a page for me. It works fine except for one thing.
My mouseover settings don't appear to take. i.e. I
see nothing at all when I move the mouse cursor over
the image. If I replace the object creation code with
a plain document.write, it works. :
// this works as expected
document.write("<img src='marker12.gif' \
id='1' \
onmouseover='return overlib(\"First Image\");' \
onmouseout='return nd();'/>"
);
// this creates the image, but the mouseover does not work
imgObj = document.createElement("img");
imgObj.src = "marker12.gif";
imgObj.onmouseover="return overlib(\"Second Image\");";
imgObj.onmouseout="return nd();";
imgObj.id = 2;
document.body.appendChild(imgObj);
The behavior is the same in IE as it is in Mozilla.
I'm a newbie at this, Can anyone see what I'm doing wrong?
Thanks,
Jim Buzbee
--
--------------------------------------------------------------------------------
Jim Buzbee "I was gratified to be able to
jb*****@nyx.net answer promptly, and I did. I
http://batbox.org said I didn't know." Mark Twain