View Full Version : close a window knowing only its name
12-07-2004, 10:00 PM
If you know the name of the window (as set in a window.open() command or with window.name='something'), but do not have a pointer to the window itself, you can recreate the pointer by re-opening the window, then close it with the new pointer. The downside to this approach is that if the window is not open in the first place, a new window will be opened and immediately closed.
var w = window.open('',windowName);
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.