?
Solved

Close a popup after postback

Posted on 2006-04-13
4
Medium Priority
?
510 Views
Last Modified: 2008-03-03
I have some aspx code(behind) evaluating a condition that, if true, should cause a child of the existing window to close. Javascript code as below would have been used to create the popup and I can call JS function that should close it.

>>
  top.open(theURL,'myWin','resizable=yes,width=760,height=470');
<<

The problem appears to be that the main window loses scope of the child because of a necessary postback. Is there a way to maintain a reference to the child so I can close it after the main postsback?

thx
--steve...
0
Comment
Question by:juststeve
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:aki4u
ID: 16445394
did you tried to use html hidden field?
0
 

Author Comment

by:juststeve
ID: 16445429
Nope...got a sample?
0
 
LVL 10

Accepted Solution

by:
aki4u earned 1200 total points
ID: 16446094
sorry about hidden field...you can use this (assuming that window is still open):

window.open('','myWin').close();
0
 

Author Comment

by:juststeve
ID: 16446623
Thankx!
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question