I am having some problems with a script that loads popups. I understand on some machines it fails to work. The suggestion has been made that it is a timing problem ie: the file is trying to load before the window loads.

This is the function

function win(fileName) {
myFloater = window.open('','myWindow','scrollbars=no,status=no,width=550,height=500,top=15,left=200')
myFloater.location.href = fileName;

and a sample call

<A HREF="javascript:win('monoprints/geese.html')"><img src="monoprints/S_geese.jpg" width="252" height="177" border="0"></a>

Question how can I put a timeout of say 1000 to ensure the popup window is loaded before the "geese.html" page tries to enter it. I tried something like this to amend the function but it didn't work. The popup window was created but the geese.html didn't load in it.

setTimeout("myFloater.location.href = fileName",1000);

If anyone could help it would be appreciated.