View Full Version : Help with window.close() with frames
cbittakis
09-05-2002, 02:45 AM
I have a two frame page and need to put a exit button on the left hand side frame. I can not get window.close() to work. I would like it to close down all pages. This works fine without frames. Any help would be greatly appreciated.
adios
09-05-2002, 03:00 AM
Try top.close() - and be prepared for a prompt if the window involved wasn't opened with JS.
http://www.webxpertz.net/forums/showthread.php3?threadid=7854&perpage=15&pagenumber=1
cbittakis
09-05-2002, 04:03 AM
Outstanding reply! Both options worked. Thanks again.
vkidv
09-05-2002, 04:27 PM
with top.close()
would top have to be the name of the frame?
would this work?
window.close(<framename>)
?:confused:
joh6nn
09-05-2002, 08:20 PM
no to both of those questions.
top is a window object, that refers to the the top level window. so that if you have a page in a frame, then top refers to the frame that has the <FRAMESET> html in it.
using window.close(theframename); would probably cause an error.
vkidv
09-07-2002, 04:36 PM
is there any other things like
top.close()
like to close a certain frame?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.