I toyed around with this idea too. I made an inline absolutely positioned
DIV with a loading message. Once the DynAPI has loaded, I simply hide it.
Showing the layer is easy, because you just define it inline, sans
javascript and dynAPI - then just hide it at the end of the dynAPI.onLoad().
There are probably more elegant ways to do it, but it works.
- Abre
-----Original Message-----
From: Hershel Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 12:11 PM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] How to show loading status
I have a page which generates a LOT of layers when it loads. This
generation can take over 10 seconds on my 450MHz WinNT machine. I would
like to be able to show a "Please wait" window so the user has something to
look at while waiting. I am having trouble doing this.
I tried this:
DynAPI.onLoad = function() {
waitlayer=new DynLayer(null,410,5,400)
waitlayer.setHTML("Please wait.")
DynAPI.document.addChild(waitlayer)
//alert(1)
makeLayers()
}
function makeLayers() {
// make a lot of layers here :)
}
This code does not work. I don't see the waitlayer until makeLayers is
finished 10 seconds later. If I uncomment the alert(1), however, then I DO
see the waitlayer and the alert box. When I press the OK button, I wait 10
seconds and then see all the layers.
Any ideas?
Thanks,
Hershel
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help