there are 2 pages :
main.php
popup.php
--------------------------------
main.php :
has a link that open a new window (popup.php)
popup.php :
has a form. once the button is clicked, it will update the database, then this new window will close automatically.
when the new window closed, main.php will refresh automatically.
how to make these things possible? FYI, im using macromedia dreamweaver. sorry if my english is bad.
open popup>close>refresh main
Moderator: General Moderators
Put this is you <head> tag
Then, after you have done your DB update, just call
And please try to post in the correct forum!
Code: Select all
<script language="JavaScript">
<!--
function refreshParent() {
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
//-->
</script>Code: Select all
<script language="JavaScript">refreshParent();</script>[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
solved!!!!
when db update done, just call the refreshParent
thanks!!!!!!
when db update done, just call the refreshParent
Code: Select all
if ($updateSQL) {
echo "<body onload='refreshParent()'>"; }