javascript - Call a function in the main window when closing another popup window -
i have page. when click on link in page opens popup window. when click on link in popup window opens new popup window , closes first popup. in last popup can edit information. when window closes need call function in first page.
i've tried:
<script type="text/javascript">     window.onbeforeunload = function(){         window.opener.opener.relcontacten();     } </script>   where relcontacten() function defined in first page , looks this:
function relcontacten(){     $.get(         'contactlijst.php',         function(response){             $('#contactlijst').html(response);         }     ); }   does know way call function in specific window without using opener?
try use .load()
function relcontacten(){      $('#contactlijst').load('contactlijst.php'); }   and beforeunload can use
 window.addeventlistener("beforeunload", function (e) {         relcontacten();  });      
Comments
Post a Comment