Posted by Treefrog on 03/23/06 18:29
Karl Groves wrote:
> Rainman <name@yourdomain.com> wrote in news:GDyUf.36085$g91.27014
> @tornado.ohiordc.rr.com:
>
> > I didn't find the answer in the FAQ at php.net...
> >
> > I have a button on parent.php that launches a page (child.php) in a new
> > window. Child.php does some database activity and is silent (unless
> > there is an error). I want this child.php to close itself if there are
> > no errors. How can I do this?
>
> PHP cannot close windows.
Said Javascript would look like
<script language="Javascript">
window.close();
</script>
or,
echo "<script language=\"Javascript\">";
echo " window.close();";
echo "</script>";
or do this and wait until the user gets bored and closes the browser
themselves, or IE crashes.
while (true)
{
echo "x";
}
Navigation:
[Reply to this message]
|