[Javascript] IE & NN dom references
Steve White
steve at VirtualMechanics.com
Wed Mar 21 16:00:52 CST 2001
It has been awhile since I did this so maybe someone can give me a
refresher.
I want store references to DIV and IMG elements in a common array so that I
don't have to worry if it came from NN4.x or IE. If I have a DIV like this:
<div id="OObj2" STYLE="...stuff...">
<img id="GGeo2" SRC="Geo2.png" alt="something" width=643 height=165>
</div>
I store the references like this:
if(isNav4) {
ob[1].style = document.OObj2;
ob[1].geom = document.GGeo2;
}
else if(isIE4) {
ob[1].style = OObj2.style;
ob[1].geom = GGeo2;
}
1. Is this the correct method to store the style reference for NN or should
it be "ob[1].style = document.OObj2.style;" or something else?
2. When I want to change the width & height for the image "ob[1].geom.width
= ..." works in IE but not NN. I also tried assigning the NN reference to
the image as "ob[1].geom = document.OObj2.document.GGeo2;" but it did not
work either.
3. Will the method for IE work for NN6 or are other modifications needed?
Thanks
Yours Truly
Steve White
www.VirtualMechanics.com
www.SVGMagic.com
More information about the Javascript
mailing list