Sailing_12
asked on
Reference other window (not child)
I have a window which is opened via window.open method from an iframe.
I need to be able to access the popup window from a document in a different iframe.
I have given the popup window the name HRA and tried to call hra.close from the other iframe but it is not working. How do I get a reference to the popup window from the iframe that did not spawn it?
I need to be able to access the popup window from a document in a different iframe.
I have given the popup window the name HRA and tried to call hra.close from the other iframe but it is not working. How do I get a reference to the popup window from the iframe that did not spawn it?
ASKER
I don't actually want to close it, that is just a test to see if I'm referencing it successfully.
I actually want to call a function on the page.
I actually want to call a function on the page.
save the reference on the parent window.
ask the parent window to do the job :)
ask the parent window to do the job :)
ASKER
Is this right?
<a id="aHRABalance" runat="server" onclick="var w = window.open(this.href, 'HRApopupwindow', 'width=1080,height=500,scr
remove "var "
I suppose there's a href at the end.
I suppose there's a href at the end.
ASKER
the href is being written programattically from .vb codde-behind (this is .net app).
This code successfully gets me the title of the page on which the function is written I want to fire. How do I call the function?
This code successfully gets me the title of the page on which the function is written I want to fire. How do I call the function?
parent.frames['IFRAME_ResourceArea'].document.frames['ifrmBenefits'].document.title
ASKER
Sorry, that last code succesfully gives me the title of the document which spawned the popup - the function I want to get at is in the head of the document loaded in the child popup.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got it. Included the reference to the child window (renamed hraPopupRef)
parent.frames['IFRAME_ResourceArea'].document.frames['ifrmBenefits'].hraPopupRef.UncheckHRAClaims()
ASKER
Thanks.
ask the parent window to do the job (close window)