I am using multiple scripts to get to a sub-window. I want to know how to alert the parent window name? Is there anything like alert(window.opener)?
I am using multiple scripts to get to a sub-window. I want to know
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes,
window.openerexists as a reference to the window that opened the current window. It’s supported in at least Chrome, Firefox, IE and Opera.https://developer.mozilla.org/en/DOM/window.opener
http://msdn.microsoft.com/en-us/library/ms534309(VS.85).aspx
If you’re looking to get a reference to the function that created the window, you could add it yourself as a property of the window: