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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Never mind i got it @comment.body = "" before the page.replace On Nov 1, 1:34 am, tyliong <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of tyliong Sent: Saturday, November 01, 2008 2:08 AM To: Ruby on Rails: Talk Subject: [Rails] Re: form.text_area, how do you empty its contents? Never mind i got it @comment.body = "" before the page.replace On Nov 1, 1:34 am, tyliong <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s the browser doing that... I don''t think you can stop it from doing that on a refresh. On Oct 31, 3:01 pm, "Tan YL" <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > -----Original Message----- > From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of tyliong > Sent: Saturday, November 01, 2008 2:08 AM > To: Ruby on Rails: Talk > Subject: [Rails] Re: form.text_area, how do you empty its contents? > > Never mind i got it > @comment.body = "" before the page.replace > > On Nov 1, 1:34 am, tyliong <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Actually... I''m sure you could do it with Javascript On Oct 31, 3:01 pm, "Tan YL" <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > -----Original Message----- > From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of tyliong > Sent: Saturday, November 01, 2008 2:08 AM > To: Ruby on Rails: Talk > Subject: [Rails] Re: form.text_area, how do you empty its contents? > > Never mind i got it > @comment.body = "" before the page.replace > > On Nov 1, 1:34 am, tyliong <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah I managed to find out shortly after I typed that message page.form.reset -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of sw0rdfish Sent: Saturday, November 01, 2008 3:24 AM To: Ruby on Rails: Talk Subject: [Rails] Re: form.text_area, how do you empty its contents? Actually... I''m sure you could do it with Javascript On Oct 31, 3:01 pm, "Tan YL" <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On further look investigation I haven''t really solved the problem. Thetext> is erased after I submit the form but it still remains when I refresh the > page. > > -----Original Message----- > From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of tyliong > Sent: Saturday, November 01, 2008 2:08 AM > To: Ruby on Rails: Talk > Subject: [Rails] Re: form.text_area, how do you empty its contents? > > Never mind i got it > @comment.body = "" before the page.replace > > On Nov 1, 1:34 am, tyliong <tyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > 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?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---