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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit form, close pop up and then refresh the main window?

Status
Not open for further replies.

Beat

Technical User
Aug 26, 2001
41
SE
If u have a link to open up a popup window with an update or insert form. You enter the values and submit the form. Can you then, on submit, close the pop up window and also refresh the main window so your updated or inserted entries will be displayed?

thanks!
 
What I ususally do, is as soon as I submit the form I have it close then simply display a "In Progress" page for about 3 secodns then redirect back to where my results show updated

Here's how I close the "In Progress" page.
<body onload=&quot;setTimeout('window.close()',3000)&quot;>
[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
Hi,

YOu can do what you wanted to do by using TonyU's code and in the popup window add the following js code:
In the Head section
<script>
var howLong = 5500;

t = null;
function closeMe(){
t = setTimeout(&quot;self.close()&quot;,howLong);
}
</script>
In the body tag have this code:
<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot; onload=&quot;closeMe();self.focus()&quot; onUnload=&quot;opener.location='yourpageyouwanttorefreshto.asp'&quot;;>

This works quite nicely and avoids users going click crazy.

M &quot;There are 3 kinds of people; those that can count and those that can't&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top