Click to See Complete Forum and Search --> : window.open delays setTimeout


venkyt
12-08-2003, 09:12 PM
I have a setTimeout(5 sec). But when i do a window.open event on click of a button the setTimeout seems to extend the timeout period to 6-7 sec. This extra time is the browser took to open the new window.

Is there any way to avoid this?

-Venky

batfink
12-09-2003, 12:13 PM
Afraid not. Even though the timing appears precise (in milliseconds) do not rely on it for 100% accuracy. As you've found out other internal processing, delays the timing a bit.

venkyt
12-09-2003, 09:48 PM
OK...i found out the problem

I'm using window.open("url", "window name");

the "window name" is taking the extra time (6-7 sec) to open new window as i had atleast 20 windows opened. This makes IE to wait for extra 6-7sec eventhough timeOut might have happened.

Now i changed the code to

if (winHandle)
winHandle.close();

winHandle = window.open("url", "");