posted 18 years ago
We would like to logout a user if they close their browser, and this can be done with onbeforeunload="logout()". However, if the user has opened multiple windows, we only want to call logout() when the last window is closed, and not if any window is closed.
How can a JS method detect if there are any other parent or children windows still running ?
window.top() does not seem to work in this case - is this only useful for frames ?
thanks,
-Jeff