<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma size=2><B>From:</B> SkyScanner<BR><B>Sent:</B> Monday,
September 26, 2005 4:31 AM<BR></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial color=#000080>From: "Peter-Paul Koch" <</FONT><A
href="mailto:pp.koch@gmail.com"><FONT face=Arial
color=#000080>pp.koch@gmail.com</FONT></A><FONT face=Arial><FONT
color=#000080>><BR>> Most browsers (except Opera) change the visible
display of the page<BR>> only when all scripts have exited completely.
Solution: use a timeout:<BR><BR>function show()<BR>{<BR> gif.src =
'pleasewait.gif'; // or whatever<BR>
setTimeout('slow_routine()',10);<BR>}<BR><BR>> Now the script exits after
the gif has been set and the browsers show<BR>> it. Then the slow routine
kicks in. Result: user sees Please Wait.<BR></FONT><BR></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Hi - I got it working after a bit of experimentation. I
found that it would only work properly if I placed a timeout around the slow
routine *and* the hide routine.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT
face=Arial>showGif('icon_5');<BR>setTimeout("slowRoutine()",10);<BR>setTimeout("hideGif('icon_5')",10);</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><BR></FONT> </DIV></BLOCKQUOTE></BODY></HTML>