window open callback

Posted by w3diy - 1 year ago callback

Set a callback function to a new window in javascript

reference holder only

var RunCallbackFunction = function() { }; callback event

You may call a parent function from child window this way:


To call a child function in parent window: has a function on window called "getProducts"

var w =,''); 

This JavaScript code :

capture the close event of an opened window by in JavaScript.

var getProducts ="/get_products.html");

getProducts.onbeforeunload = function () {
    // processing event here
    alert("new window closed");