Click here to Skip to main content
15,908,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm stuck in solving a problem. I've a parent aspx page which has a button that opens another aspx page (not button_click event, the page is opened by javascript). In the new opened page, I've some text fields and a button. After clicking the button on the page, a popup box is displayed and upon clicking 'ok' in the popup box, it closes the page. So far, it's working as expected. But I need to reload the first page while closing the second page. Could anyone please help me how to solve this please. I'm not really expert in javascript. I'd really appreciate your help.

Thanks

Raj
Posted

 
Share this answer
 
Add this Script in Head.

JavaScript
<script>
    function closewindow()
    {
window.opener.location.reload(true);
window.close();
    
    }
    </script>


and call it on Close Button to Reload Parent window

like this

HTML
<input id="Button1" type="button" value="Close" onclick="closewindow();" />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900