Click to See Complete Forum and Search --> : closing browser windows


bcomer
01-16-2003, 08:43 AM
Folks:

I am working on a WEB application that opens several
child windows during a session. The JavaScript I have
written tracks the windows that are opened and walks
the list during logout calling windowref.close() on each.

Some of the windows do not close properly leaving the
application in a goofy state. Is there a JavaScript
call that I can make that will close all windows associated
with a given HTTP session?

Thanks in advance
Barry

Beldale
01-16-2003, 09:43 AM
Here is a little something we use OnUnload - hope it helps.

function closeWindows()
{
if (child != null)
{
child.close();
}
if (newWin != null)
{
newWin.close();
}
}