Pages

Saturday, 1 June 2013

Refreshing Parent page from child page using JavaScript

use this javascript function on ypur child page :
 <script type="text/javascript">
    function closechildwindow() {
        window.opener.document.location.href = '(parent page url)';
        window.close();
    }
</script>

now in the body tag of your child page call the function like this:
<body onunload="closechildwindow()">

No comments:

Post a Comment