is there any way to Form.reset (clear all fields of the form ) in form_remote_tag generated form? I want to reset fields after ''submit'' in .rjs. -- Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
On 12/23/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote:> is there any way to Form.reset (clear all fields of the form ) in > form_remote_tag generated form? > > I want to reset fields after ''submit'' in .rjs.page.call ''Form.reset'', form_id -- rick http://techno-weenie.net
Hiroshi Takagi wrote:>is there any way to Form.reset (clear all fields of the form ) in >form_remote_tag generated form? > >I want to reset fields after ''submit'' in .rjs. > > > >Hi, Hiroshi, you might find the javascript example at: http://www.fclonline.com/Articles/ClearAllFieldsinaDiv.html helpful. You could send a javascript-call that fits your needs to the page you want to modify by: page << "your javascript call" when you are on EdgeRails Regards Jan Prill
Hiroshi Takagi wrote:>is there any way to Form.reset (clear all fields of the form ) in >form_remote_tag generated form? > >I want to reset fields after ''submit'' in .rjs. > > > >Hi, Hiroshi, ok. Forget my post! Rick provided a much more elegant way... Regards Jan Prill
On Fri, 23 Dec 2005 10:09:41 -0600 Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12/23/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote: > > is there any way to Form.reset (clear all fields of the form ) in > > form_remote_tag generated form? > > > > I want to reset fields after ''submit'' in .rjs. > > page.call ''Form.reset'', form_idThanks, Rick. but in my environment, it does not work. I''m still staying in gems 1.0 and using RJS templates with the plugin. page.call results in "NoMethod error". I''ve hacked the add_rjs_to_javascript_helper.rb of the plugin and found that it does not support public instance methods #call, #delay, etc. anyway, thank you for your tip. -- Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
Hi, On 12/25/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote:> On Fri, 23 Dec 2005 10:09:41 -0600 > Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 12/23/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote: > > > is there any way to Form.reset (clear all fields of the form ) in > > > form_remote_tag generated form? > > > > > > I want to reset fields after ''submit'' in .rjs. > > > > page.call ''Form.reset'', form_id > > Thanks, Rick. > > but in my environment, it does not work. > I''m still staying in gems 1.0 and using RJS templates with the plugin. > > page.call results in "NoMethod error". > I''ve hacked the add_rjs_to_javascript_helper.rb of the plugin and found > that it does not support public instance methods #call, #delay, etc. > > anyway, thank you for your tip.The 1.0 plugin is not an official distribution and is probably outdated. RJS is still in development and currently only supported in Rails trunk. -- sam
Hiroshi, What Sam says is the case at the moment. I haven''t had time to add the latest RJS features from changeset http://dev.rubyonrails.org/changeset/3319 and above to the plugin yet. I hope to look into adding them in the next few days. Cody On 12/25/05, Sam Stephenson <sstephenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > On 12/25/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote: > > On Fri, 23 Dec 2005 10:09:41 -0600 > > Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On 12/23/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote: > > > > is there any way to Form.reset (clear all fields of the form ) in > > > > form_remote_tag generated form? > > > > > > > > I want to reset fields after ''submit'' in .rjs. > > > > > > page.call ''Form.reset'', form_id > > > > Thanks, Rick. > > > > but in my environment, it does not work. > > I''m still staying in gems 1.0 and using RJS templates with the plugin. > > > > page.call results in "NoMethod error". > > I''ve hacked the add_rjs_to_javascript_helper.rb of the plugin and found > > that it does not support public instance methods #call, #delay, etc. > > > > anyway, thank you for your tip. > > The 1.0 plugin is not an official distribution and is probably > outdated. RJS is still in development and currently only supported in > Rails trunk. > > -- > sam > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- http://www.codyfauser.com
The ''call'' method was added to the trunk on December 21, so this is really new. Working with Edge rails is the best way to keep up with the RJS updates. -----Original Message----- From: Hiroshi Takagi [mailto:gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org] Sent: Sunday, December 25, 2005 7:21 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] how to form.rest in RJS On Fri, 23 Dec 2005 10:09:41 -0600 Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12/23/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote: > > is there any way to Form.reset (clear all fields of the form ) in > > form_remote_tag generated form? > > > > I want to reset fields after ''submit'' in .rjs. > > page.call ''Form.reset'', form_idThanks, Rick. but in my environment, it does not work. I''m still staying in gems 1.0 and using RJS templates with the plugin. page.call results in "NoMethod error". I''ve hacked the add_rjs_to_javascript_helper.rb of the plugin and found that it does not support public instance methods #call, #delay, etc. anyway, thank you for your tip. -- Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Cody, On 12/25/05, Cody Fauser <codyfauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hiroshi, > > What Sam says is the case at the moment. I haven''t had time to add > the latest RJS features from changeset > http://dev.rubyonrails.org/changeset/3319 and above to the plugin yet. > I hope to look into adding them in the next few days.Thanks very much for your work on making the plugin. I didn''t mean to discount it, I just want to clarify that RJS is very much a work in progress. -- sam
Sam,> Thanks very much for your work on making the plugin. I didn''t mean to > discount it, I just want to clarify that RJS is very much a work in > progress.No offence taken. I realize that RJS is a moving target and that having the plugin and the code in the core makes diagnosing problems posted to this list a bit more of a pain. I''ll try to keep on top of your changes as much as I can. I''m also planning to make a disclaimer page so that users of the plugin know that it isn''t officially supported by the core team. Thanks all your great work on RJS. Cody On 12/25/05, Sam Stephenson <sstephenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Cody, > > On 12/25/05, Cody Fauser <codyfauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hiroshi, > > > > What Sam says is the case at the moment. I haven''t had time to add > > the latest RJS features from changeset > > http://dev.rubyonrails.org/changeset/3319 and above to the plugin yet. > > I hope to look into adding them in the next few days. > > Thanks very much for your work on making the plugin. I didn''t mean to > discount it, I just want to clarify that RJS is very much a work in > progress. > > -- > sam > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- http://www.codyfauser.com
Cody On Sun, 25 Dec 2005 19:34:13 -0500 Sam Stephenson <sstephenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Cody, > > On 12/25/05, Cody Fauser <codyfauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hiroshi, > > > > What Sam says is the case at the moment. I haven''t had time to add > > the latest RJS features from changeset > > http://dev.rubyonrails.org/changeset/3319 and above to the plugin yet. > > I hope to look into adding them in the next few days. > > Thanks very much for your work on making the plugin. I didn''t mean to > discount it, I just want to clarify that RJS is very much a work in > progress. > > -- > samI don''t mean your plugin has a fault or something. I just want to make it clear what the cause is. Your plugin brings me a great help even without ''call'' and ''delay'' methods. I''m a rather _conservative_ guy and don''t catch up with Edge Rails, so I am pretty lucky when I found your excellent RJS plugins. Thank you for your effort. I really appreciated it. -- Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
Hiroshi, I''ve added support for the latest RJS features to the plugin up until changeset 3335. If you want to give it a try just check out the latest version of the plugin from the subversion repository. Cody On 12/26/05, Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> wrote:> Cody > > On Sun, 25 Dec 2005 19:34:13 -0500 > Sam Stephenson <sstephenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Cody, > > > > On 12/25/05, Cody Fauser <codyfauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hiroshi, > > > > > > What Sam says is the case at the moment. I haven''t had time to add > > > the latest RJS features from changeset > > > http://dev.rubyonrails.org/changeset/3319 and above to the plugin yet. > > > I hope to look into adding them in the next few days. > > > > Thanks very much for your work on making the plugin. I didn''t mean to > > discount it, I just want to clarify that RJS is very much a work in > > progress. > > > > -- > > sam > > I don''t mean your plugin has a fault or something. I just want to make > it clear what the cause is. > Your plugin brings me a great help even without ''call'' and ''delay'' > methods. I''m a rather _conservative_ guy and don''t catch up with Edge > Rails, so I am pretty lucky when I found your excellent RJS plugins. > > Thank you for your effort. I really appreciated it. > > > -- > Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org> > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- http://www.codyfauser.com
Cody, On Mon, 26 Dec 2005 04:09:30 -0500 Cody Fauser <codyfauser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hiroshi, > > I''ve added support for the latest RJS features to the plugin up until > changeset 3335. If you want to give it a try just check out the latest > version of the plugin from the subversion repository.I''ve just downloaded your new plugin and check it out. Great job! alert, redirect_to, call, delay... all new methods works. Thank you. -- Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
Hi, The url http://www.fclonline.com/Articles/ClearAllFieldsinaDiv.html is not found. Is there any updated link? Jan Prill wrote:> > Hiroshi Takagi wrote: > >>is there any way to Form.reset (clear all fields of the form ) in >>form_remote_tag generated form? >> >>I want to reset fields after ''submit'' in .rjs. >> >> >> >> > Hi, Hiroshi, > > you might find the javascript example at: > http://www.fclonline.com/Articles/ClearAllFieldsinaDiv.html helpful. > > You could send a javascript-call that fits your needs to the page you > want to modify by: > > page << "your javascript call" > when you are on EdgeRails > > Regards > Jan Prill > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- View this message in context: http://www.nabble.com/how-to-form.rest-in-RJS-tf797753.html#a11766953 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---