# Web programming question (help)

**URL:** https://boards.straightdope.com/t/web-programming-question-help/50717
**Category:** Factual Questions
**Created:** [January 18, 2001, 5:39pm UTC](https://boards.straightdope.com/t/web-programming-question-help/50717 "2001-01-18T17:39:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BaronVonK](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@BaronVonK](https://boards.straightdope.com/u/BaronVonK)
#### Post date: [January 18, 2001, 5:39pm UTC](https://boards.straightdope.com/t/web-programming-question-help/50717/1 "2001-01-18T17:39:03Z")

</div>

does anyone know how to use a link for form submission (as opposed to a button)? I think it’s javascript related, and I remembered seeing code for it a while ago, but can’t find it again. Any help would be much appreciated.

---

<div class="post-metadata">

### Author: ![tanstaafl](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@tanstaafl](https://boards.straightdope.com/u/tanstaafl)
#### Post date: [January 18, 2001, 9:19pm UTC](https://boards.straightdope.com/t/web-programming-question-help/50717/2 "2001-01-18T21:19:22Z")

</div>

Well, the short answer is that you use an onClick handler in the link to call the submit() method of the Form object. Something like…  
…onClick=“formname.submit(); return;”…

Is this enough or do you need a full example?

---

<div class="post-metadata">

### Author: ![BaronVonK](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@BaronVonK](https://boards.straightdope.com/u/BaronVonK)
#### Post date: [January 19, 2001, 5:00am UTC](https://boards.straightdope.com/t/web-programming-question-help/50717/3 "2001-01-19T05:00:16Z")

</div>

that worked perfectly, thanks.

I was trying to modify the dropdown list redirection so it would submit instead of redirect to a URL.
