[HTML] Linking a button

Newbie Spellweaver
Joined
Jan 5, 2009
Messages
72
Reaction score
0
I need to link a button to a voting website..
I tried doing the <a href.. thing, but that didn't work :(
Apparently it's a form or something?
If anyone could help me that'd be great :D

PHP:
<form id="form1" name="form1" method="post" action="">
                    <table cellspacing="0" cellpadding="5" width="100%">
                  <tr>
                            <td width="45%" align="right" class="list"><small>Account 

:</small></td>
                          <td align="left" class="list"><input id="username" 

type="text" name="username" maxlength="12"></td>
                        </tr>
                        <tr>
                          <td width="45%" align="right" class="list"><small>Password 

:</small></td>
                          <td align="left" class="list"><input id="password" 

type="password" name="password" maxlength="20" /></td>
                        </tr>
                        <tr>
                            <td width="45%" align="right" 

class="list"><small>Character:</small></td>
                          <td align="left" class="list"><input id="char" type="text" 

name="char" maxlength="12"></td>
                        </tr>
                        <tr>
			<td align="center" 

colspan="2"><input type="submit" value="Vote!"></td>
                        </tr>
                    </table>
            </form>

The website is http://owl-ms.tk if you need to go and look..
Just click the NX button (the text under the white present)
I need to make the button that says "Vote!" link you to another page.
And if you could help me make it so that they have to wait 12 hours in between voting, that'd be even better :)

Thanks!
 
I'm not sure but I think this is what you're looking for:
Code:
//You can put this in a div and hide it if you don't want user to fill it in
<form action="Target site URL here" method="post name="postForm"">
     <input type="text" name="input you need" />
</form>

//Content

<a href="#" onclick="document.getElementById('postForm').submit(); return false;">Click here! </a>

I think it's the right syntax not sure was a long time ago that I used it. Anyways I hope you get the idea, the form.submit() simulates the effect submitting a form by clicking a button the return false makes the A link stop linking.
 
Back