cyrus71 Posted November 20, 2005 Share Posted November 20, 2005 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 More sharing options...
Skemcin Posted November 20, 2005 Share Posted November 20, 2005 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 More sharing options...
cyrus71 Posted November 20, 2005 Author Share Posted November 20, 2005 I take it you want to refresh the parent window - the opener? If so, here you go:<{POST_SNAPBACK}> Thank you ,How can i use it?i have a link on the popup window that closes the window, how my link kan use this script.? Link to comment Share on other sites More sharing options...
Chocolate570 Posted November 20, 2005 Share Posted November 20, 2005 <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 More sharing options...
Skemcin Posted November 20, 2005 Share Posted November 20, 2005 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 More sharing options...
cyrus71 Posted November 22, 2005 Author Share Posted November 22, 2005 <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> <{POST_SNAPBACK}> 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 More sharing options...
Chocolate570 Posted November 22, 2005 Share Posted November 22, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now