# HTML Help: Buttons that link and the people who want them

**URL:** <https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428>\
**Category:** Factual Questions\
**Created:** [March 21, 2002, 10:31pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428 "2002-03-21T22:31:51Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [March 25, 2002, 10:46pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/21 "2002-03-25T22:46:01Z")

</div>

I think galt is saying:

```auto

<form method="GET" action="http://www.foo.com/spa">
<input type="submit" value="go">
</form>

```

At least, I hope that is what he is saying, because it works.

---

<div class="post-metadata">

**Author:** ![OneChance](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@OneChance](https://boards.straightdope.com/u/OneChance)\
**Post date:** [March 25, 2002, 10:54pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/22 "2002-03-25T22:54:43Z")

</div>

**erislover** , now I see what he was referring to exactly. Although that does work, it appears that some browsers append a question mark to the URL after the button is clicked. Usually not a problem, I suppose.

---

<div class="post-metadata">

**Author:** ![Duckster](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/duckster/32/1244_2.png) [@Duckster](https://boards.straightdope.com/u/Duckster)\
**Post date:** [March 25, 2002, 11:18pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/23 "2002-03-25T23:18:32Z")

</div>

Strange how the KISS Principle seems to be forgotten here. 🙂

Sure one can use a FORM to create an ordinary link. But why do it? Just because you can? If anything, this smacks more of ego wanking than quality, tight code. Code bloat is a serious problem in and of itself. So why contribute to it, even on such a small scale? Seems to me if you are going to create extra work for yourself in one area, you will probably do it in other areas of the site, too.

In addition, you also raise a red flag for intelligent surfers who see a FORM action (the submit button) without any actual form fill-in-the-blanks. For me, I would be viewing the source code to see if I’m about to send hidden data someplace without my knowledge or permission.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [March 25, 2002, 11:29pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/24 "2002-03-25T23:29:02Z")

</div>

> [@](#):
>
> \*Originally posted by Duckster \*  
> \*\*Strange how the KISS Principle seems to be forgotten here. 🙂
> 
> Sure one can use a FORM to create an ordinary link. But why do it? \*\*

I already answered that.

> [@](#):
>
> _Originally posted by Lance Turbo re: javascript onclick event handler_  
> \*\*The drawback of this is that it may not work on browser’s with javascript diabled. \*\*

---

<div class="post-metadata">

**Author:** ![galt](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@galt](https://boards.straightdope.com/u/galt)\
**Post date:** [March 26, 2002, 2:54am UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/25 "2002-03-26T02:54:33Z")

</div>

> [@](#):
>
> \*Originally posted by Duckster \*  
> \*\*Strange how the KISS Principle seems to be forgotten here. 🙂
> 
> Sure one can use a FORM to create an ordinary link. But why do it? Just because you can? If anything, this smacks more of ego wanking than quality, tight code. Code bloat is a serious problem in and of itself. So why contribute to it, even on such a small scale? Seems to me if you are going to create extra work for yourself in one area, you will probably do it in other areas of the site, too.
> 
> In addition, you also raise a red flag for intelligent surfers who see a FORM action (the submit button) without any actual form fill-in-the-blanks. For me, I would be viewing the source code to see if I’m about to send hidden data someplace without my knowledge or permission. \*\*

This is not an issue of “code bloat” or “tight code” (the code in the browser to handle form submissions is certainly at least as efficient as the code to start up a javascript interpreter for a single frickin’ assignment statement), and for your information, when the original requirement is “how do I use a button like a link on an html page” then it’s **eminently** appropriate to use a form. You want to fake it with something that looks like a button but isn’t? Fine, but don’t be surprised when your buttons look and act funny under certain circumstances, confusing the user.

In addition, intelligent surfers know that it doesn’t take a visible form button to submit a form, so whether or not what you’re clicking on is obviously a button, hidden fields may exist. Buttons don’t indicate form data is being sent, and the lack of buttons doesn’t indicate that it’s not. [behold](http://www.codsquad.com/~galt/hiddenform.html)

And finally, using javascript and/or CGI when it’s not necessary is hardly the KISS principle. Sometimes when someone asks “how do I do X?” the simplest answer is “like this”, not “well here’s a way to do something that kind of looks like X but forces you to learn a new technology and/or just copy and paste without understanding it.”

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [March 26, 2002, 3:33am UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/26 "2002-03-26T03:33:28Z")

</div>

Wow, this thread got fucking preachy.

There are many ways to make link buttons. We listed them. Let **Fenris** decide what he wants.

---

<div class="post-metadata">

**Author:** ![galt](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@galt](https://boards.straightdope.com/u/galt)\
**Post date:** [March 26, 2002, 4:01am UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/27 "2002-03-26T04:01:41Z")

</div>

> [@](#):
>
> \*Originally posted by erislover \*  
> \*\*Wow, this thread got fucking preachy.
> 
> There are many ways to make link buttons. We listed them. Let **Fenris** decide what he wants. \*\*

grumble. tell that to the guy throwing around terms like “code bloat” and “ego wanking” while providing wrong answers.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [March 26, 2002, 3:33pm UTC](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428/28 "2002-03-26T15:33:44Z")

</div>

I was 😉

[Previous page](https://boards.straightdope.com/t/html-help-buttons-that-link-and-the-people-who-want-them/99428.md?page=1)
