Instead of just closing the window try this : Echo"<script language=\"javascript\">opener.location.reload(); window.close(); </SCRIPT>";
Sincerely berber Visit http://www.weberdev.com 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 To: PHP-DB 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 "index.php". I have also displayed a buttonin index.php, which i will used the "onClick" event to trigger a "window.open" 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. regards -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php