giving commans to a parent window
Moderator: General Moderators
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
giving commans to a parent window
Is there any way that when you open up a new window via javascript and that same window is closed is it possible to send a command back to the the parent window when it closes? i.e. after a page is viewed the status on the main page is going to change, i want to reflect this change as soon as the window is closed.this could be accomplished by simply refreshing the window but i want it dont automatically.make any more sense?
Code: Select all
<script type='text/javascript'>
window.addEventListener('load', function(e) {
window.addEventListener('unload', function(e) {
window.opener.Func();
}, false);
}, false);
</script>
This is pop-up window. When it's closed (or reloaded) it would run the Func function in the context of its opener
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm