Forum: Ruby on Rails form.text_area, how do you empty its contents?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tyl T. (Guest)
on 2008-10-31 19:35
(Received via mailing list)
Hi, after i click submit and refresh the parital(with
page.replace_html) with the remote_form_for, the <%=
form.text_area :body, :rows => 10, :cols => 40 %> still contains the
previous text. how do i totally remove the text inside of it?
Tyl T. (Guest)
on 2008-10-31 20:08
(Received via mailing list)
Never mind i got it
@comment.body = "" before the page.replace
Tyl T. (Guest)
on 2008-10-31 20:51
(Received via mailing list)
On further look investigation I haven't really solved the problem. The
text
is erased after I submit the form but it still remains when I refresh
the
page.
sw0rdfish (Guest)
on 2008-10-31 21:24
(Received via mailing list)
That's the browser doing that... I don't think you can stop it from
doing that on a refresh.
sw0rdfish (Guest)
on 2008-10-31 21:25
(Received via mailing list)
Actually... I'm sure you could do it with Javascript
Tyl T. (Guest)
on 2008-10-31 21:26
(Received via mailing list)
Yeah I managed to find out shortly after I typed that message
page.form.reset
This topic is locked and can not be replied to.