I'm unable to get the correct content width/height values with the
getContentWidth() and getContentHeight() methods using Netscape 6. The
following example shows 776 for the Width and 0 for the Height.
Example:
<script language="Javascript" src="../js/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../js/lib/')
DynAPI.include('dynapi.api.dynlayer.js')
DynAPI.include('dynapi.api.browser.js')
DynAPI.include('dynapi.api.dyndocument')
DynAPI.onLoad=function() {
var w = DynAPI.getDocument().getWidth()
var h = DynAPI.getDocument().getHeight()
mainLayer = new DynLayer(null,0,0,100,100,'red')
subLayerA = new DynLayer(null,0,0,60,20,'yellow')
subLayerB = new DynLayer(null,0,0,60,50,'blue')
mainLayer.addChild(subLayerA)
mainLayer.addChild(subLayerB)
mainLayer.moveTo((w/2)-50,(h/2)-50)
subLayerA.moveTo(20,10)
subLayerB.moveTo(20,40)
DynAPI.document.addChild(mainLayer)
subLayerA.setHTML('<center><font size=-2 face=arial
color=black>0123456789<font></center>')
subLayerB.setHTML('<center><font size=-2 face=arial color=white>Browser =
'+is.b+'<br>Ver = '+is.v+'<br>W = '+subLayerA.getContentWidth()+'<br>H =
'+subLayerA.getContentHeight()+'<font></center>')
}
</script>
Any help on this matter will be greatly appreciated.
Regards,
H. M. Gonzalez
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help