Reloading a specific window
| From: | Rich Fox | Date: | Thu, 02 Oct 2003 15:17:09 +0000 |
| Subject: | Reloading a specific window | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164764@lists.php.net to get a copy of this message | ||
Warning for server side purists: My php scripts use javascript to popup and
close windows. So this question, although posted to a php newsgroup, has
elements of javascript too. Gasp! No flames please.
I have a main window which I will refer to as mainwindow
(window.name='mainwindow' in the onload event). The script loaded into it is
mainListing.php. From mainListing.php I popup another window, with a form
and a save button. The form's action is "action.php"
In action.php I update the database and then would like to: (1) refresh
mainwindow so it reflects the database changes, and (2) close the popup
window.
I have been reading, tweaking, trying different things but nothing is
working. Currently, the action script does:
...
elseif (isset($_POST['btnSave']))
{
.. update the database, then ...
header("Location:
".$_POST['CallingScript']."?ID=".$_POST['ID']);
exit;
}
...
This reloads the popup window, and then I have a "close" button to close the
popup. Then I have to refresh the browser window manually to see the updated
table from the database. Can I get some advice on how to accomplish (1) and
(2) above?
Many thanks,
Rich