i just need to call function in parent window while user is focusing on child window. i have this code in my parent window,
Try something like below:
parent.html
Click here to open the child window
child.html
This is Child window
You should not do this on the parent, otherwise opener.CallParent() will not work, doing window.CallParent makes CallParent available as window scope:
function CallParent() {
alert(" Parent window Alert");
}
And then you can simply call opener.CallParent();
not window.opener.CallParent();
.