---
title: "How to submit form without submit button?"  
description: "How to submit form without submit button?"  
author: "Chris Anderson"  
published: 2011-10-17  
updated: 2020-09-15  
canonical: https://www.mindstick.com/interview/1297/how-to-submit-form-without-submit-button  
category: "javascript"  
tags: ["javascript"]  
reading_time: 2 minutes  

---

# How to submit form without submit button?

With this method, you can cause a form to be submitted when the user clicks on a regular link, which can be a text link or an image link.\
\
**This requires two steps.**\
\
**First step, the form**\
\
Give your form a name. This is done in the FORM tag itself:\
\
<form\
name="MyForm"\
method="POST"\
action="/cgi-bin/script.cgi">\
**\
Second step, the JavaScript**\
\
Create a link containing the submit command\
\
<a href="javascript:document.MyForm.submit();">\
Click to submit the form\
</a>\
\
**Optional third step**\
\
You can remove the submit button or, to be kind to the few non-JavaScript browsers that visit your site, put it between NOSCRIPT tags:\
\
<noscript>\
<input type="submit" name="Click here">\
</noscript>\
\
The above will display the submit button only when non-JavaScript browsers visit the page.

## Answers

### Answer by Chris Anderson

With this method, you can cause a form to be submitted when the user clicks on a regular link, which can be a text link or an image link.\
\
**This requires two steps.**\
\
**First step, the form**\
\
Give your form a name. This is done in the FORM tag itself:\
\
<form\
name="MyForm"\
method="POST"\
action="/cgi-bin/script.cgi">\
**\
Second step, the JavaScript**\
\
Create a link containing the submit command\
\
<a href="javascript:document.MyForm.submit();">\
Click to submit the form\
</a>\
\
**Optional third step**\
\
You can remove the submit button or, to be kind to the few non-JavaScript browsers that visit your site, put it between NOSCRIPT tags:\
\
<noscript>\
<input type="submit" name="Click here">\
</noscript>\
\
The above will display the submit button only when non-JavaScript browsers visit the page.


---

Original Source: https://www.mindstick.com/interview/1297/how-to-submit-form-without-submit-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
