Re: Call JS Function with PHP Header()?
| From: | John Nichel | Date: | Thu, 03 Jun 2004 17:38:14 +0000 |
| Subject: | Re: Call JS Function with PHP Header()? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187565@lists.php.net to get a copy of this message | ||
Nick Wilson wrote:
Hi everyone, I am trying to work within someone elses modular system so my flexibility is rather limited. I'm trying to do this: header("Location: javascript:this.print()"); Which of course does not work. Anyone know how I might do it? Many thanks...You can't call JS functions from PHP. Server side vs. Client side thing. You could.... header ( "Location: mypage.html" ); -----\ mypage.html \----- <head> <title></title> <script language="JavaScript"> function print() { code... code... window.close(); } </script> <head> <body onLoad="JavaScript:print()"> </body> </html> -- John C. Nichel KegWorks.com 716.856.9675 john@kegworks.com