# Clear a textarea when I click on "Submit"

**URL:** <https://www.ruby-forum.com/t/clear-a-textarea-when-i-click-on-submit/161138>\
**Category:** Rails\
**Created:** [February 23, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/clear-a-textarea-when-i-click-on-submit/161138 "2009-02-23T19:27:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![loader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/5daacb/32.png) [@loader](https://www.ruby-forum.com/u/loader)\
**Post date:** [February 23, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/clear-a-textarea-when-i-click-on-submit/161138/1 "2009-02-23T19:27:19Z")

</div>

Hello everyone!

My page reloads itself as soon as I click on “Submit”. My question is :  
how can I clear the content which is in my textarea?

I’m using the method submit\_to\_remote for my submit button.

Thank you!
