this is what I use :
DynLayer.prototype.getContentWidth=function() {
    if (!this.created) return 0
    else {
        if (is.ns4) return this.doc.width
        else if (is.ns5) return parseInt(this.elm.offsetWidth)
                else return parseInt(this.elm.scrollWidth)
    }
}
DynLayer.prototype.getContentHeight=function() {
    if (!this.created) return 0
    else {
        if (is.ns4) return this.doc.height
        else if (is.ns5) return parseInt(this.elm.offsetHeight)
        else return parseInt(this.elm.scrollHeight)
    }
}

> and none seem to work.  This is the source of several problems with the DynAPI in NS 
>6.

this is true if you try to getContentWidth and Height 
before the layer it's actually shown in the page
coz the browser itself takes time to get the info aboutthe layer ,(sorry but my 
english sucks)

I've tested in many ways and like i said before in the widget-list the only way is to 
put a setTimeout for ns6
but that cause other problem when u have a lot of nested layers or complex widget

once the layer it's on the page u can alert(myLayer.getContentWidth()) and it will work

ciao
Y
> 
> -- 
> // Robert Rainwater
> ----------------------
> DynAPI Snapshots: http://dynapi.sourceforge.net/snapshot/
> DynAPI Homepage: http://dynapi.sourceforge.net/
> 
> 
> 
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev



_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to