# How to call submit buttons through javascript!

**URL:** <https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286>\
**Category:** Deployment\
**Created:** [April 6, 2007, 8:52am UTC](https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286 "2007-04-06T08:52:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@prot](https://www.ruby-forum.com/u/prot)\
**Post date:** [April 6, 2007, 8:52am UTC](https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286/1 "2007-04-06T08:52:45Z")

</div>

i need to call submit button on href could you ppl plz help me out wit  
this situation…  
\<%= start\_form\_tag %\>  
\<%= submit\_tag %\>  
instead of ths i want using javascript  
\<%= end\_form\_tag %\>

---

<div class="post-metadata">

**Author:** ![prot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@prot](https://www.ruby-forum.com/u/prot)\
**Post date:** [April 6, 2007, 9:44am UTC](https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286/2 "2007-04-06T09:44:43Z")

</div>

Hi,

You should call the submit method of the form directly.

Something like this (not tested)

link\_to\_function “Submit link”, “$(‘myformId’).submit();)”

Mickael

2007/4/6, Abhishek S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
