View Full Version : Close window by name
landon11
03-20-2003, 02:09 PM
Can you close a window by useing its name or any other way besides if it was opened by you or the opener.
Roy Sinclair
03-20-2003, 03:38 PM
IIRC, you can get a handle to a named window by using the window.open function without specifying a new url. Using that handle you can then close the named window.
winhandle = window.open('','windowname','options used only if window does not exist already')
winhandle.close()
Borgtex
03-20-2003, 03:39 PM
Can you formulate the question again? Exactly, what do you want to do?
In javascript, you can assign a window to a variable and then close it...
a=window.open('....')
...
a.close()
landon11
03-20-2003, 03:54 PM
I have a page that opens two windows. From one of the opened windows I want to close the other.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.