Instead of just closing the window try this :

Echo"<script language=\"javascript\">opener.location.reload();
window.close(); </SCRIPT>";



Visit Today!!! 
To see where PHP might take you tomorrow.

-----Original Message-----
From: Shahmat Dahlan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 8:36 AM
Subject: [PHP-DB] Force Refresh on Another Window w/ Javascript
Importance: High

I have a question, let's say i have my main page (so called) called

I have also displayed a buttonin index.php, which i will used the
"onClick" event to trigger a "" function to the same main
page, "index.php" (but with parameters).

<input type="button" value="Add New Records"
onClick="parent.location.href='<% echo $PHP_SELF; %>?action=addnew';">

so my index.php should have these codes

if( $action == addnew )
else {

NOTE: i'm using asp tags set in php.ini

during the adding of new records, i have also display another button
called "Close Window". And when I close this, how do i force the main
page (which is in a different window to refresh, to display the newly
added records). This is because after I have closed the add new records
window, and close it, i would have to have either a refresh button or
you would have to refresh it yourself.

And thanks in advance.


PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to