|
 |
asptoday_discuss thread: Please help : refresh window from pop up window
Message #1 by "Tan Chye Ting" <chyeting18@h...> on Fri, 1 Feb 2002 09:26:53
|
|
i want to refresh another window from the popup
window once i have updated my database with the data i input into the
popup window..the flow goes like this
1)i click on a button in the main window
2)a popup window appears
3)i input data into the popup window
4)update the database by calling Add.asp
5)close the popup window from Add.asp
6)refresh the main window so i can see the changes in the database
my problem is in step 6, because i can't refresh the main window,so i
can't actually see the changes i have made through the pop up window...i
will want to invoke an event to refresh the main window once i have
updated the database
Message #2 by "Vani" <vani@a...> on Sat, 2 Feb 2002 08:46:39 +0300
|
|
Hi,
You can do something like this
Function refreshmainwindow() {
// this will close the pop up window
Close();
// this will reload the parent window...
if (!window.opener.closed) {
window.opener.location.reload();
window.opener.focus();
}=09
}
bye
vani.
-----Original Message-----
From: Tan Chye Ting [mailto:chyeting18@h...]
Sent: Friday, February 01, 2002 12:27 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] Please help : refresh window from pop up
window
i want to refresh another window from the popup
window once i have updated my database with the data i input into the
popup window..the flow goes like this
1)i click on a button in the main window
2)a popup window appears
3)i input data into the popup window
4)update the database by calling Add.asp
5)close the popup window from Add.asp
6)refresh the main window so i can see the changes in the database
my problem is in step 6, because i can't refresh the main window,so i
can't actually see the changes i have made through the pop up window...i
will want to invoke an event to refresh the main window once i have
updated the database
Message #3 by "Vani" <vani@a...> on Sat, 2 Feb 2002 09:11:34 +0300
|
|
Hi Chye,
What I wrote earlier is applied if you are updating the database in the
same page (I mean in the pop up window itself, instead of calling
Add.asp page.)
Try this one and check.....
Window.opener.close();
is for closing the popup window from Add.asp//
Then you have to refresh the main window
Main window will be
window.opener.parent.opener.location.reload();
window.opener.parent.opener.focus();
But I was unable to understand, why you need a mediator file Add.asp.
you can as well do the additions into the database from the popup window
itself. .or is there any special requirement for calling the Add.asp
page...
-----Original Message-----
From: Tan Chye Ting [mailto:chyeting18@h...]
Sent: Friday, February 01, 2002 12:27 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] Please help : refresh window from pop up
window
i want to refresh another window from the popup
window once i have updated my database with the data i input into the
popup window..the flow goes like this
1)i click on a button in the main window
2)a popup window appears
3)i input data into the popup window
4)update the database by calling Add.asp
5)close the popup window from Add.asp
6)refresh the main window so i can see the changes in the database
my problem is in step 6, because i can't refresh the main window,so i
can't actually see the changes i have made through the pop up window...i
will want to invoke an event to refresh the main window once i have
updated the database
|
|
 |