Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

HTML button dir help

Ok so i want to make a button on my website that when you click it
it takes your to a diffrent html file E.x.
your on the website in index.html you click the button your get transfered to
test.html thank - Dat boi
Code
<FORM METHOD="link" ACTION="differentfile.html">
<INPUT TYPE="submit" VALUE="Button">
</FORM>
Skype: ryand.8

[Image: XbaG5gl.gif]

Couldn't you just add a href tag to the button element?

Nowadays? I'm just here for the nostalgia.
(Dec 22, 2016 12:36 AM)ryan⚜ Wrote:  
Code
<FORM METHOD="link" ACTION="differentfile.html">
<INPUT TYPE="submit" VALUE="Button">
</FORM>

Thank you
Pretty sure it shouldn't be done like Ryan suggested as it's a form sending nothing to another page.
Same applies for the anchor around a button as its seen as very bad practice.

If you're using a framework like Bootstrap, there's really simple ways to make this happen by using:

Code
<a class="btn" href="link.html">Link</a>

If you're not using any frameworks, then you could just make your own styles for the element.
Web Designer / Developer & SEO Expert.

View Work
Earn 10% of the job you refer me to!

Skype aerox.design


(Dec 22, 2016 02:26 PM)Rushax Wrote:  Pretty sure it shouldn't be done like Ryan suggested as it's a form sending nothing to another page.
Same applies for the anchor around a button as its seen as very bad practice.

If you're using a framework like Bootstrap, there's really simple ways to make this happen by using:

Code
<a class="btn" href="link.html">Link</a>

If you're not using any frameworks, then you could just make your own styles for the element.
This. A form is not necessary. All you need is an anchor tag and some CSS to make it a button. If you're not using Bootstrap, it wouldn't be hard to wrap an anchor tag around the button.
Forms shouldn't be used for sending a user to another page for just a redirect. You only need a form if you're sending data through. Use an anchor tag like what the others have quoted above.
Whoaaaaa, seems a lot of hate is coming from this lol. Yes, it's better to do this as someone suggested.

<a class="btn" href="link.html">Link</a>

I posted that shit at 2am, relax people, you don't shoot the dude at burger king for accidentally putting onions on your burger..
Skype: ryand.8

[Image: XbaG5gl.gif]

(Dec 24, 2016 03:55 PM)ryan⚜ Wrote:  Whoaaaaa, seems a lot of hate is coming from this lol. Yes, it's better to do this as someone suggested.

<a class="btn" href="link.html">Link</a>

I posted that shit at 2am, relax people, you don't shoot the dude at burger king for accidentally putting onions on your burger..
Not having a go at all lol, it's Xmas. Peace & love ✌

I think it's just better to say something so OP can know right okay, this works but its not really supposed to be done like this.

Happy Holidays 🤗
Web Designer / Developer & SEO Expert.

View Work
Earn 10% of the job you refer me to!

Skype aerox.design


Im sure people reacted like that because that was a really obscure way to solve his problem lmao
(Dec 24, 2016 03:55 PM)ryan⚜ Wrote:  relax people, you don't shoot the dude at burger king for accidentally putting onions on your burger..

...I didn't get that memo
all dis over a post asking for halp? im so confused
lol
(Jan 14, 2017 12:50 AM)Jeffr3y Wrote:  all dis over a post asking for halp? im so confused
lol

They're offering you 2 ways to do it.
Best option:
Code
<a class="className" href="mylink.html">My Link</a>

and in the CSS...

Code
.className{
padding:10px;
color:white;
background-color:black;
text-align:center;
margin:20px;
}


Possibly Related Threads...
Thread / Author Replies Views Last Post
by MindJul 25, 2020 10:41 AM 8 196 Jul 25, 2020 10:41 AM
Last Post: Nachfolger
by Account of the GodsDec 30, 2017 09:21 AM 6 225 Dec 30, 2017 09:21 AM
Last Post: Account of the Gods
by TomodachiAug 29, 2017 05:12 PM 9 247 Aug 29, 2017 05:12 PM
Last Post: Riggs