Re: closing windows
| From: | Jeff Harris | Date: | Wed, 23 Jul 2003 22:06:25 +0000 |
| Subject: | Re: closing windows | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156551@lists.php.net to get a copy of this message | ||
On Jul 23, 2003, "Jon Phipps" claimed that:
|I am curious as to how, from within php, you could emulate the javascript
|window.close() function. The other thing is how would I blend javascript and
|php, it call javascript functions from php. The javascript will be located
|in the same page as the php.
|
|Jon
|
Since JavaScript is client side, and PHP is serverside, you would blend
Javascript and PHP the same way you blend HTML and PHP.
<?php
print("<script language=\"JavaScript\">\n");
print("window.close();");
?>
Jeff
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc |
gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.