Form.text_area, how do you empty its contents?


#1

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?


#2

Never mind i got it
@comment.body = “” before the page.replace


#3

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.


#4

That’s the browser doing that… I don’t think you can stop it from
doing that on a refresh.


#5

Yeah I managed to find out shortly after I typed that message
page.form.reset


#6

Actually… I’m sure you could do it with Javascript