Reputation: 1087
Parent Html Code 1.html
<a onClick='window.open("1.php","Page","menubar=no, status=no, scrollbars=no, menubar=no, width=200, height=100");return false;'>
1.php code:
echo '<script type="text/javascript">window.close();</script>';
Required: On closing of popup done by "window.close();", i need to send ajax request from 1.html. how can we do it ?
Upvotes: 2
Views: 128
Reputation: 3153
You can call any JavaScript function in the parent window, like this in the .php HTML:
window.opener.functionNameOfTheOpenerWindow();
Read more here http://www.w3schools.com/jsref/prop_win_opener.asp
Upvotes: 1