By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,381 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,381 IT Pros & Developers. It's quick & easy.

Please Wait for Javascript Processes

P: n/a
Hi all,

I have a webpage that does a long process in javascript. I am opening
a popup page while this process is running. The only problem is, the
popup page doesnt finish loading and the popup window is kinda like
stalled while the mainpage goes about finishing the long process.

How can I make sure that the popup finish loading everything before
the long process starts?

PS: I do not wished to use timeouts because the process might not be
long in all instances and if that is the case, I dont want a delay
before the popup is closed.

HELP ME!!
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> I have a webpage that does a long process in javascript. I am opening
a popup page while this process is running. The only problem is, the
popup page doesnt finish loading and the popup window is kinda like
stalled while the mainpage goes about finishing the long process.

How can I make sure that the popup finish loading everything before
the long process starts?

PS: I do not wished to use timeouts because the process might not be
long in all instances and if that is the case, I dont want a delay
before the popup is closed.


Put the long process code in a function and pass the function to setTimeout. You
can give it a delay time of 0, so it won't slow things down. That will allow the
current sequence to complete so that the popup can be displayed.

http://www.crockford.com/

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.