Can someone here take a second and show me how to put a link onto a "submit" button

7 replies
I am trying to use a submit button, on my sales page, however I just need it to act like a link. I have found a few "tutorials" on how to do it, but I cannot seem to get them to work.

Here is the submit button code:
Code:
<table align="center" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td id="submitpad" onmousedown="this.style.backgroundColor='#ce0000'" onmouseover="this.style.backgroundColor='#009900'" onmouseout="this.style.backgroundColor='#ce0000'" nowrap="nowrap"> <span style="cursor: pointer"> <input name="submit" style="height: 40px; cursor: pointer; font-weight: bold; font-family: Tahoma,Verdana; font-size: 15pt" value="Click Here &gt;&gt;" type="submit" /></span> </td></tr></tbody></table>
I found one site that said you need to change the input from "submit" to "button". I followed their advice but it still wouldnt work.

Lets say for example that I want it to go to google.com when clicked. How do I put that in there.

I really appreciate it, I think I was going to go crazy if I kept looking for the answer! So I came to the trusty warriorforum!

Ashley
#button #link #put #show #submit
  • Profile picture of the author dsbonn
    try this...use onClick

    <form action="" method="get">

    <input type=button onClick="location.href='xxxx'" value=submit>

    </form>


    where xxxx is the url of the page you want to go to
    {{ DiscussionBoard.errors[2011979].message }}
    • Profile picture of the author Ashley Gable
      Originally Posted by dsbonn View Post

      try this...use onClick

      <form action="" method="get">

      <input type=button onClick="location.href='xxxx'" value=submit>

      </form>


      where xxxx is the url of the page you want to go to
      Thanks for the reply.

      So if I am right, my code would now look like this: (changes made in red)

      Code:
      <form action="" method="get">
       <table align="center" border="0" cellpadding="0" 
       cellspacing="0"> 
      
      <tbody> 
      
      <tr> 
      
      <td id="submitpad" 
       onmousedown="this.style.backgroundColor='#ce0000'" 
       onmouseover="this.style.backgroundColor='#009900'" 
       onmouseout="this.style.backgroundColor='#ce0000'" 
       nowrap="nowrap"> <span style="cursor: pointer"> 
      
       <input name="submit" style="height: 40px; cursor: 
       pointer; font-weight: bold; font-family: 
       Tahoma,Verdana; font-size: 15pt"  type="button" 
      onClick="location.href='http://www.google.com'" 
      value=Click Here />
      </span> 
       </td></tr></tbody></table> 
      
      </form>
      {{ DiscussionBoard.errors[2012014].message }}
  • Profile picture of the author dsbonn
    actually,

    you can do without the <form> and the </form>

    and dont forget to replace the xxxx with the url of the page
    {{ DiscussionBoard.errors[2012023].message }}
    • Profile picture of the author Ashley Gable
      Originally Posted by dsbonn View Post

      actually,

      you can do without the <form> and the </form>

      and dont forget to replace the xxxx with the url of the page

      Okay took out the form parts.

      I just went and checked it on a webpage, it is working. It takes me straight to google, except I cant get it to say anything other than "Click".

      Do i have the "Value" part right?
      {{ DiscussionBoard.errors[2012046].message }}
  • Profile picture of the author dsbonn
    any luck? or still struggling?
    {{ DiscussionBoard.errors[2012051].message }}
  • Profile picture of the author dsbonn
    yes, change the value part to some like this

    value = "click this button"

    dont forget the quotes
    {{ DiscussionBoard.errors[2012059].message }}
    • Profile picture of the author Ashley Gable
      Originally Posted by dsbonn View Post

      yes, change the value part to some like this

      value = "click this button"

      dont forget the quotes
      Oh lol that was it, I left the quotes out!

      Thank you so much! I really really appreciate it, you just saved me a boat load of time!

      Thanks for taking the time to help me out.

      Ashley
      {{ DiscussionBoard.errors[2012066].message }}

Trending Topics