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.
0bdaf2a5cf0a401d2ee4377b9ce47581?d=identicon&s=25 Tyl Tan (tyanlion)
on 2008-10-31 18: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?
0bdaf2a5cf0a401d2ee4377b9ce47581?d=identicon&s=25 Tyl Tan (tyanlion)
on 2008-10-31 19:08
(Received via mailing list)
Never mind i got it
@comment.body = "" before the page.replace
0bdaf2a5cf0a401d2ee4377b9ce47581?d=identicon&s=25 Tyl Tan (tyanlion)
on 2008-10-31 19: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.
Ae993d5cbc25d61aa3a10fc08eaea11b?d=identicon&s=25 sw0rdfish (Guest)
on 2008-10-31 20: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.
Ae993d5cbc25d61aa3a10fc08eaea11b?d=identicon&s=25 sw0rdfish (Guest)
on 2008-10-31 20:25
(Received via mailing list)
Actually... I'm sure you could do it with Javascript
0bdaf2a5cf0a401d2ee4377b9ce47581?d=identicon&s=25 Tyl Tan (tyanlion)
on 2008-10-31 20: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.