Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-24-2012, 09:24 PM   PM User | #1
camaross
Regular Coder

 
Join Date: Jan 2011
Posts: 130
Thanks: 101
Thanked 0 Times in 0 Posts
camaross is an unknown quantity at this point
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
camaross is offline   Reply With Quote
Old 08-25-2012, 01:21 AM   PM User | #2
FishMonger
Super Moderator


 
Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,757
Thanks: 2
Thanked 149 Times in 144 Posts
FishMonger will become famous soon enoughFishMonger will become famous soon enough
Code:
<input type="button" value="Google" onclick="window.location.href='http://www.google.com'">
FishMonger is offline   Reply With Quote
Users who have thanked FishMonger for this post:
camaross (08-26-2012)
Old 08-26-2012, 11:15 PM   PM User | #3
camaross
Regular Coder

 
Join Date: Jan 2011
Posts: 130
Thanks: 101
Thanked 0 Times in 0 Posts
camaross is an unknown quantity at this point
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'">
camaross is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:41 AM.


Advertisement
Log in to turn off these ads.