Re: Call JS Function with PHP Header()?
| From: | Torsten Roehr | Date: | Thu, 03 Jun 2004 17:37:26 +0000 |
| Subject: | Re: Call JS Function with PHP Header()? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187564@lists.php.net to get a copy of this message | ||
"Nick Wilson" <nick@stylesheet.org> wrote in message
news:20040603173819.GA26983@stylesheet.org...
> 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...
> --
> Nick W
Hi Nick,
try this:
echo "<script language=\"JavaScript\">
<!--
this.print();
//-->
</script>";
You have to put it into a valid HTML page.
Regards, Torsten Roehr