OnClick event handler to show PDF file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Todd Cary

    OnClick event handler to show PDF file?

    [The code is running in PHP]

    Currently, 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?

    Todd

  • Ivo

    #2
    Re: OnClick event handler to show PDF file?

    "Todd Cary" <todd@aristesof tware.com> wrote in message
    news:zPPoc.1108 1$Fo4.145566@ty phoon.sonic.net ...[color=blue]
    > [The code is running in PHP]
    >
    > Currently, 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="">');[/color]

    <? ... onclick="window .open( \''. $url . $sfyc_race_schd _send.'\'
    ,\'_blank\' ); " ... ?>

    should pop-open your file just like the link.
    HTH
    Ivo


    Comment

    • Todd Cary

      #3
      Re: OnClick event handler to show PDF file?

      Ivo -

      Many thanks! I got the OnClick() to work in bringing up the file, but
      what I really needed was the new window!!

      Todd

      Ivo wrote:[color=blue]
      > "Todd Cary" <todd@aristesof tware.com> wrote in message
      > news:zPPoc.1108 1$Fo4.145566@ty phoon.sonic.net ...
      >[color=green]
      >>[The code is running in PHP]
      >>
      >>Currently, 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="">');[/color]
      >
      >
      > <? ... onclick="window .open( \''. $url . $sfyc_race_schd _send.'\'
      > ,\'_blank\' ); " ... ?>
      >
      > should pop-open your file just like the link.
      > HTH
      > Ivo
      >
      >[/color]

      Comment

      Working...