Reading value of elements of Parent window at Childe window and vise versa
We can enter data at Parent window and same data will be passed to child window once it is opened. Similarly data from child window will be available at Parent window once child window is closed. We will be using window.opener to access data from parent.
At child window
$('#d1').html("Parent Window Data = " + str);
Sometime we will be refreshing part of the display area of parent window without reloading the full page. Such requirement comes when we update a database record at child window and wants to reflect the same at parent window.
We can execute a function in parent window matching with the closing of child window.
While closing the child window we will use onunload event to trigger a function which loads part of the page with fresh data from backend PHP file.