Its not failing, its what you expect. Images do not load
instantaneously, therefore the width of the dynimage is not known
until the image has completed loading.
--
Robert Rainwater
On 4/11/2001, 6:07:28 PM EST, Gregor wrote about "[Dynapi-Help] Example of failure in
NS":
;[EMAIL PROTECTED]>
> Sent: Wednesday, April 11, 2001 9:25 AM
> Subject: [Dynapi-Help] Example of failure in NS
>
> > The following code fails in NS. I've looked at the DynAPI code but
> > can't quite figure it out:
> >
> > DynAPI.onLoad = functio
may not be a factore.. by I would use .getWidth(0 rather tha .w as
.getWidth(0 would be more likly to have any NS6 fix.
- Original Message -
From: "Gregor Brandt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 9:25 AM
Subject: [Dynapi-He
Thats most likely because the image hasn't loaded yet. If you want to
wait until then you say:
DynImage.onLoaderDone = function() {
alert(testimage.w)
}
--
Robert Rainwater
On 4/11/2001, 12:25:25 PM EST, Gregor wrote about "[Dynapi-Help] Example of failure in
NS":
>
The following code fails in NS. I've looked at the DynAPI code but
can't quite figure it out:
DynAPI.onLoad = function()
{
testimage = new
DynImage('../src/lib/dynapi/images/common/arrowup.gif');
DynAPI.document.addChild( testimage );
alert( testimage.w );
}
In IE and