opener.closeAllButNotMe("myName");
window.closeAllButNotMe = function( dontCloseMeName ) {
for(windowName in window.windows) {
if( windowName != dontCloseMeName ) {
var windowObj = window.windows[ windowName ];
windowObj.close();
}
}
}
var name = "login";
window.windows[name] = window.open(url, name, params);
// somewhere else
var name = "otherName";
windows[name] = window.open(url, name, params);
// somewhere else
var name = "otherName";
windows[name] = window.open(url, name, params);
Here's a good tutorial that keeps track of the child windows, then a function to close them.
http://www.codelodge.net/2012/11/closing-all-child-windows-using.html