Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    136
    Thanks
    101
    Thanked 0 Times in 0 Posts

    Button to link within Form tags

    How do I add a button next to the current button "DOWNLOAD", so that when users click it, they are taken to a new website, such as http://www.google.com?


    Code:
    print <<"EOT";
    <form action="/cgi-bin/extract.pl" method="post">
    <div align="center">
    
    <table>
    <tr class="reg">
    <td align="left">
    <input type="submit" name="what" value="DOWNLOAD" />
    <input type="hidden" name="file_name" value="$file" />
    <input type="hidden" name="probe_name" value="$probe" />
    <input type="hidden" name="query_results" value="$q_sum_out" />
    </td></tr>
    </table>
    
    </div>
    </form>
    EOT

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,915
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Code:
    <input type="button" value="Google" onclick="window.location.href='http://www.google.com'">

  • Users who have thanked FishMonger for this post:

    camaross (08-27-2012)

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    136
    Thanks
    101
    Thanked 0 Times in 0 Posts
    Wow, this works really well.

    Thank you so much for the help.


    Quote Originally Posted by FishMonger View Post
    Code:
    <input type="button" value="Google" onclick="window.location.href='http://www.google.com'">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •