Re: OnClick handler to show PDF
| From: | John Nichel | Date: | Thu, 13 May 2004 19:17:19 +0000 |
| Subject: | Re: OnClick handler to show PDF | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186147@lists.php.net to get a copy of this message | ||
John Nichel wrote:
Todd Cary wrote:And it was off.... <input type="button" name="View Schedule" onClick="JavaScript:document.location=<?php echo ( $url ); ?>" /> Damn adding extra quotes. -- John C. Nichel KegWorks.com 716.856.9675 john@kegworks.comCurrently, I have a Link to show a PDF file <? print('Click <a href="' . $url . $sfyc_race_schd_send . '" Name="Race Schedule" Target="_blank">here</a> to open the Race Schedule'); ?> I want to replace it with a button and an OnClick() <? print('<input type="button" name = "View Schedule" OnClick="">'); ?> I cannot get the syntax correct for the OnClick. Is this the best way to use a button for the task? ToddSince this is a PHP mailing list, my JavaScript may be a bit off.... <input type="button" name="View Schedule" onClick="JavaScript:document.location="<?php echo ( $url ); ?>" />