I tried that. It does not work consistently. I tried multiple values in the timeout. From 10 to 5000. It seems to help for the first resize but then makes no difference.
 
Without Dynimages in the file, your delay isn't even necessary. It works every time. I sat and just kept resizing it multiple times, without incident and without a settimeout.
 
If you make a layer, and give it a child of a dynimage, the resizing has problems.
 
The below code doesn't work when resizing your page in NS. But, if you comment out the 3 lines that refer to the menuarrow variable, everything works great.
 
DynAPI. {
 var menuarrowimg = DynImage.getImage('cgi-bin/master/images/arrowright.gif');
 myLayer = new DynLayer()
 myLayer.setSize(200,200)
 myLayer.moveTo(50,50)
 myLayer.setBgColor("yellow")
 menuarrow = new DynImage(menuarrowimg)
 menuarrow.moveTo(25,25)
 myLayer.addChild(menuarrow)
 myLayer2 = new DynLayer()
 myLayer2.setSize(50,50)
 myLayer2.moveTo(50,50)
 myLayer2.setBgColor("red")
 myLayer2.setHTML("<IMG SRC=cgi-bin/master/images/arrowright.gif>")
 myLayer.addChild(myLayer2)
 DynAPI.document.addChild(myLayer)
}
-----Original Message-----
From: Doug Melvin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 12:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] Resizing Help

Ack!!
I've already proven that is not necessary,
all you are doing there is re-loading the whole site each time you resize the browser..
 
This can eat a LOT of ram and crash you computer.
 
all you have to do is define a function which 'resizes' you page,
and call THAT function with a delay:
 
DynAPI.onResize = function() {
 
    setTimeout("MyOnResize();",10);
 
}
----- Original Message -----
Sent: Tuesday, February 20, 2001 6:58 AM
Subject: Re: [Dynapi-Help] Resizing Help

DynAPI.onResize = DynAPI. {

ALL THE CODE THAT CREATES MY YOUR WEBSITE HERE.

}

simple ain't it?

"Chad R. Thomson" wrote:

okay, I've read some 'helps' on how to capture the resizing in NS.

I've got:

DynAPI.onResize = function() { alert('resize') }

DynAPI. {

ALL THE CODE THAT CREATES MY WEBSITE HERE.

}

I'd like to throw all the 'code' into another .js or at least a function,
and call it from both (I suppose).
But can't seem to get the onResize to capture.  I never get the alert.

Anyone??
Chad.

******************************************
Chad R. Thomson
Senior Programmer/Analyst
USI - Bravepoint
WebSpeed, Java, B2B & B2C Specialists
888-874-1880 x3027
800-854-7155 FAX
http://www.bravepoint.com/
A creative Web strategy is not an option - it's a necessity
******************************************
Participating in the FreeFrameWork initiative, http://www.freeframework.org
"FreeFrameWork = WebSpeed + Open Source"

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

--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
  _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-help


---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01

Reply via email to