
How to access parent window in javascript
I have created popup and i would like to hide parent popup window from child window. I can use window.parent in IE and its working fine but i could able to access this in firefox.
모든 댓글 (5)
Window C launches from window P using window.open? I think you want window.opener:
Hello,
Thank you for your reply.
But i am open a new child window as a popup window.
Here is my code so i could get window.opener its always null.
popupProgress.SetContentUrl("ShowProgress.aspx"); popupProgress.Show();
So i just need to hide my popup from this page ShowProgress.aspx where i opened this popup from Parent.aspx.
Can you please give me some idea.
Hi Ruchita, are SetContentUrl and Show() defined in a JavaScript library? You may want to check the library documentation on how to access the opener from the child window.
Sorry but i could get your point. Can you explain me in more details.
Hi Ruchita, your code seems to use objects and functions that are not built-in JavaScript objects and functions. That is the reason I think they must be defined in a library (external script) -- the one that defines the popupProgress object. Typically you would incorporate a library into your page using
<script src="somelibrary.js" type="text/javascript"></script>
So I suggest making sure the library is up-to-date and if that doesn't help, check on whether there is any support for it from the developer/vendor.