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.g if' \
id='1' \
onmouseover='re turn overlib(\"First Image\");' \
onmouseout='ret urn nd();'/>"
);
// this creates the image, but the mouseover does not work
imgObj = document.create Element("img");
imgObj.src = "marker12.g if";
imgObj.onmouseo ver="return overlib(\"Secon d Image\");";
imgObj.onmouseo ut="return nd();";
imgObj.id = 2;
document.body.a ppendChild(imgO bj);
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
jbuzbee@nyx.net answer promptly, and I did. I
http://batbox.org said I didn't know." Mark Twain
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.g if' \
id='1' \
onmouseover='re turn overlib(\"First Image\");' \
onmouseout='ret urn nd();'/>"
);
// this creates the image, but the mouseover does not work
imgObj = document.create Element("img");
imgObj.src = "marker12.g if";
imgObj.onmouseo ver="return overlib(\"Secon d Image\");";
imgObj.onmouseo ut="return nd();";
imgObj.id = 2;
document.body.a ppendChild(imgO bj);
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
jbuzbee@nyx.net answer promptly, and I did. I
http://batbox.org said I didn't know." Mark Twain
Comment