Output from action.php:
<script>
opener.location.reload();
close();
</script>

Rich Fox wrote:
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


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to