faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

31 of 40 people (78%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

window.opener works, but opener.document fails -- FRAMES seems to cause it. Works fine w/o frames!

Jan 21st, 2003 10:28
Russ Locke, Todd Webb,


When in frames you need to reference the top (outermost) frameset 
document object, this is where the true opener is. Your javascript is 
running in one of the frames which is really in a sub-document.
do this in frames:
top.window.opener
--------------------------------------------------------------------
window.opener works, but opener.document fails -- FRAMES seems to cause 
it. Works fine w/o frames!