[Javascript] Swapping an Image
Steve White
steve at VirtualMechanics.com
Thu Jul 19 12:05:25 CDT 2001
I used to be able to swap an image in NN4.x but after some changes to add
support for NN6 it no longer works and I am not sure why.
The original image is declared:
<img id="GGeo4" Align=Top SRC="bird-1.gif" border=0 width="161px"
height="121px">
Assigned to a variable:
if(isIE4) {
ob[2].geom = document.all['GGeo4'];
if(isNN6) {
ob[2].geom = document.getElementById('GGeo4');
} else if(isNav4) {
ob[2].geom = document.layers['OObj3'].document.images['GGeo4'];
}
Swapped:
ob[2].geom.src = "bird-2.gif";
Apparently ob[2].geom is undefined.
The IE4 and NN5 versions works no problem.
Any ideas?
Thanks
Steve White
www.VirtualMechanics.com
www.DHTMLMagic.com
www.SVGMagic.com
www.IMSWebTips.com
More information about the Javascript
mailing list