Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window close property 1

Status
Not open for further replies.

mandigaraja

Technical User
Aug 7, 2000
1
US
I used window.open method to open a new window when clicked on a button which submits the form.<br>The new window displays a message saying that the data is being submitted.<br>I want to close the open window after the submitting process is completed.<br>How can I exactly find out when the form is submitted  and how can I refer the window which is already opend to be closed.<br>This is mind blowing.<br>I do not want to use any settimeout method as it fixes the time whether the form is submitted or not.<br><br>Hope somebody help me out on this.
 
What kind of form submission are you using. This could be accomplished quite simply if the processing script for the form redirected the user to a page that contains:<br><br><font color=red>&lt;script&gt;window.close()&lt;/script&gt;</font><br><br>in the body tag. This will allow the window to close when the user arrives to it. If youre using ASP to process the form, you just need to add a line:<br><br><font color=red>Response.redirect(&quot;myclosingpage.htm&quot;)</font><br><br>Other languages and protocols offer similar redirection techniques.<br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
I'm not sure if this would help... but I wrote a FAQ that shows you how to open a window and then close it to load a new page. You'd have to adapt it slightly, but it's a start. What you'd have to do is have the page that's loaded in the main window call <FONT FACE=monospace>mywindow.close()</font> in its onLoad() so it only gets called when the page is finished loading... which implies the submission is done. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top