|
|
 |
Close pop-up and refresh main page
Ophelia | Posted 12:57am 10. October 2002 Server Time |
I'm sorry to be asking so many questions, but I'm almost losing my mind on this project (not to mention my personal life - It's 9 PM in the evening and I've been working for 12 hours straight by now).
If you read the post that I wrote about pop-ups with ASP, you'll probably have guessed what I want to learn to do now: I have this page that displays the contens of a recordset, checking if any of them needs to be corrected; when it does, it displays the record in Red and present a link that oppens a pop-up window with a form.That form has in the boxes the values that need to be corrected.
What I wanted to know is how can I close the pop-up window when the form is submited and, at the same time, refresh the main window?
Can you please help me again? Thanks in advanced Ophelia
|
mmckimson | Posted 1:21pm 10. October 2002 Server Time |
This is what I did.
Open your form popup. Send the data to your page that processes the form data, and use the following in that page:
<%Your data handling stuff goes here%>
<head>
<script language="JavaScript"><!-- function supressError() { return true; }
function load(url) { window.onerror = supressError; opener.location.href = url; setTimeout(self.close(),3000); } //--></script>
</head>
<body onLoad="javascript:load(yourfirstpage.asp)">
<p>Your data has been updated!</p>
</body>
Because this page is called from the popup, it should refresh the page with the new data.
Get some sleep!
mickormick | Posted 2:22pm 10. October 2002 Server Time |
Or you can put this within the BODY tag of the popup window...
onUnload=opener.location.reload()
<body bgcolor="#FFFFFF" onUnload=opener.location.reload() leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
Ophelia | Posted 2:49am 11. October 2002 Server Time |
A thousand thanks to both of you :)
Show all replies to 'Close pop-up and refresh main page'
|
This post have been closed for new replies
|
|
|
|
 |
|