closing a window

I have a pop up window with two buttons. The ok will submit to a process page which will do  some server side processing. Once this has been completed, How can I close the popup window?
Who is Participating?
radarshConnect With a Mentor Commented:
Non-AJAX way

When you hit submit, the control will go to the server and your browser will wait for
a response. Until that is returned, you'll see a blank page. You can execute closing
by returning a "text/javascript" content-type response from the server, containing
the following code:

"<script type=\"text/javascript\">self.close();</script>"

AJAX way
AJAX being asynchronous, you can continue to display the page even after the submit
has been clicked. In the background, the server processes and once it returns the
response, a callback handler takes the response and executes it.

Mayank SAssociate Director - Product EngineeringCommented:
Sounds like a web-application and sounds like the same pop-up window needs to be notified by the server once it has finished the processing. Since this might be asynchronous, did you try AJAX?
inzaghiAuthor Commented:
Have not tried Ajax, coudn't I just use  javascript at the end of the page



Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.