I am creating a child window in Javascript using following code:
var wnd = window.open( url );
How can i determine whether child window is refreshed or not? Is there any event for it?
Thanks in advance.
I am creating a child window in Javascript using following code:
var wnd = window.open( url );
How can i determine whether child window is refreshed or not? Is there any event for it?
Thanks in advance.
I don't think there's an event for that but you might be looking for the events unload
and beforeunload
(the latter only expecting a string to be shown in a popup). These are triggered when: closing a window, navigating to a new page or refreshing the actual page.
So in your case you may write something like:
var wnd = window.open( url );
wnd.onbeforeunload = function() { do something here }
Have a look at this post for more examples.
var wnd = window.open( url ); wnd.location.reload();