Jump to content

close popup window and refresh onther


cyrus71

Recommended Posts

Hi everybodyIs there any way that you can close a popup window and update another window (like a .aspx file)here when i click on "close window" in a popup window i want to refresh another file<a href="java script:window.close()">close window</a>but how??grateful for your answer.

Link to comment
Share on other sites

I take it you want to refresh the parent window - the opener? If so, here you go:

<script language="javascript" type="text/javascript"> var oParent = window.opener; oParent.location.reload(); window.close();</script>
Link to comment
Share on other sites

<html><head><script type="text/javascript">function refreshing(){var oParent = window.opener;oParent.location.reload();window.close();}</script></head><body>...Your Content Here...<a href="refreshing()">Close Window</a></body></html>

Link to comment
Share on other sites

sorry for not mentioning that the script goes in the popup window.Thanks Chocolate for showing it being executed as a function. I've always executed it inline on an action page - didn't think to turn it into a function for this type of use. :)

Link to comment
Share on other sites

<html><head><script type="text/javascript">function refreshing(){var oParent = window.opener;oParent.location.reload();window.close();}</script></head><body>...Your Content Here...<a href="refreshing()">Close Window</a></body></html>

Thank you so much, i have to say that i am working on .NET and execute the aspx files.I did what you said exactly, and it is what i got.The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. --------------------------------------------------------------------------------Please try the following:If you typed the page address in the Address bar, make sure that it is spelled correctly.Open the localhost home page, and then look for links to the information you want. Click the Back button to try another link. HTTP 404 - File not foundInternet Information Services--------------------------------------------------------------------------------Technical Information (for support personnel)More information:Microsoft Support
Link to comment
Share on other sites

Oh darn. Let me repost that:

<html><head><script type="text/javascript">function refreshing(){var oParent = window.opener;oParent.location.reload();window.close();}</script></head><body>...Your Content Here...<a href="javascript:refreshing()">Close Window</a></body></html>

I forgot the java script: part in the href. :) Sorry!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...