Force Refresh on Another Window w/ Javascript
| From: | Shahmat Dahlan | Date: | Thu, 28 Feb 2002 06:36:21 +0000 |
| Subject: | Force Refresh on Another Window w/ Javascript | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17349@lists.php.net to get a copy of this message | ||
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