Page 1 of 1

Close PopUp after alert OK

Posted: Sun Oct 09, 2005 1:58 am
by facets
Hello All,

How could I close a popup window after the user has clicked OK from an alert?
The window opens from the user clicking update in the popup window.

Code: Select all

function updatedPopUp() {
	echo "<script type=\"text/javascript\" onclick=\"window.close()\">alert('Summary updated! Thank You.')</script>";
}
TIA, Will.

Posted: Sun Oct 09, 2005 2:12 am
by blacksnday
shouldnt the

Code: Select all

onclick=\"window.close()\"
close the window the window when clicked?

Posted: Sun Oct 09, 2005 2:14 am
by facets

Code: Select all

echo "<script type=\"text/javascript\" onclick=\"window.close()\">alert('Record updated! Thank You.');";
	echo "self.close()";
	echo "</script>";