# Submitting form\_remote\_tag with text button?

**URL:** <https://www.ruby-forum.com/t/submitting-form-remote-tag-with-text-button/143755>\
**Category:** Rails\
**Created:** [July 22, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/submitting-form-remote-tag-with-text-button/143755 "2008-07-22T14:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [July 22, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/submitting-form-remote-tag-with-text-button/143755/1 "2008-07-22T14:27:39Z")

</div>

I’m trying to submit a form\_remote\_tag using a text link, but tell the  
form to submit with javascript seems to try and submit the form  
without using AJAX.

The reason I need to use text links is that they need to underline on  
hover. I’ve style the submit buttons to look like text links, but  
they don’t have the ability to underline on hover.

Any idea on how to use a text link to submit a form\_remote\_tag?

Thanks,  
Andy

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [July 22, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/submitting-form-remote-tag-with-text-button/143755/2 "2008-07-22T14:52:24Z")

</div>

I don’t have the time to check the details myself,  
but have a look at the generated html. You’ll find, that  
fom\_remote\_tag generates an onsubmit event handler  
for the form.  
Either take that code or invoke the onsubmit event.  
(I would have thought that happens, when you call form.submit,  
but never trust javascript 😉
