开发者

How to open a PHP/form results page in a new window?

I have a form:

<form action="bar.php">
  <input type="hidden" name="foo" value="<?php SOME_STUFF(); ?>" />
  <input type="submit" />
</form>

which acts on a PHP script that generates a PDF from the form开发者_StackOverflow社区 contents:

/* bar.php */
<?php
  $html = $_POST['foo'];
  $pdf->$writeHTML($html);
  $pdf->Output('bar.pdf');
?>

And my client would like this to open in a new window. I know HTML won't validate a target attribute for a form, so must I use JavaScript? And, where?


Try to insert target="_blank" into form tag

and read this http://www.tufat.com/script19.htm about output to pdf

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜