rainborick - 3:24 pm on Dec 29, 2011 (gmt 0)
I'm still on my first cup of coffee and too muddled yet to unwind the code, but two things strike me as potential issues.
First, you use a single variable 'myWindow' to hold the result of window.open which occurs in a for-next loop. If there's a potential for more than one window to be open at a time, then, of course, you can easily run into conflicts.' Second, you don't reset the myWindow variable after you perform window.close(). You may be running into an instance where the variable evaluates to true even though the window is closed. I think the solution probably lies in doing some explicit tracking of the status of the windows you open rather than relying on the variable that holds the Window object. Good luck!