I am opening new pop-up page in new window. Now When I am pressing a html input button from child window, I want to close this child window then I want to refresh the parent window. How I can do using javascript?
Can you anyone suggest me the solution?
try something like this:
function closeAndRefresh(){
opener.location.reload(); // or opener.location.href = opener.location.href;
window.close(); // or self.close();
}
you could try this in you child window:
function refreshParent() {
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
I tried code
window.close();
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
}
Its working..