I have a form, that has the remote attribute set to true. When I submit it's basically going to save a new "Message" to the database.
However after I send the message, I want to clear the message body that the user typed in. However, it's a little weird to do this
if i use something like this:
$('form').submit(function() {
$('#text-area').val('');
})
What will happen is that the message body will clear and an empty message will be sent. I want to clear the text area after the form is submitted, not before it's submitted. Any ideas?