[Javascript] Order of script-processing
SkyScanner
skyscanner at eircom.net
Sun Sep 25 12:45:33 CDT 2005
Thanks for the idea, Peter-Paul - I'll try it out tomorrow.
Tim in Ireland
----- Original Message -----
From: "Peter-Paul Koch" <pp.koch at gmail.com>
To: "[JavaScript List]" <javascript at latech.edu>
Sent: Sunday, September 25, 2005 12:59 PM
Subject: Re: [Javascript] Order of script-processing
Most browsers (except Opera) change the visible display of the page
only when all scripts have exited completely. Solution: use a timeout:
function show()
{
gif.src = 'pleasewait.gif'; // or whatever
setTimeout('slow_routine()',10);
}
Now the script exits after the gif has been set and the browsers show
it. Then the slow routine kicks in. Result: user sees Please Wait.
More information about the Javascript
mailing list