Forum: Ruby on Rails how to form.rest in RJS

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.
Hiroshi T. (Guest)
on 2005-12-23 17:07
(Received via mailing list)
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 T. <removed_email_address@domain.invalid>
Rick O. (Guest)
on 2005-12-23 18:10
(Received via mailing list)
On 12/23/05, Hiroshi T. <removed_email_address@domain.invalid> 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
Jan P. (Guest)
on 2005-12-23 18:20
(Received via mailing list)
Hiroshi T. 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 P.
Jan P. (Guest)
on 2005-12-23 18:23
(Received via mailing list)
Hiroshi T. 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 P.
Hiroshi T. (Guest)
on 2005-12-25 17:21
(Received via mailing list)
On Fri, 23 Dec 2005 10:09:41 -0600
Rick O. <removed_email_address@domain.invalid> wrote:

> On 12/23/05, Hiroshi T. <removed_email_address@domain.invalid> 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.

--
Hiroshi T. <removed_email_address@domain.invalid>
Sam S. (Guest)
on 2005-12-25 20:04
(Received via mailing list)
Hi,

On 12/25/05, Hiroshi T. <removed_email_address@domain.invalid> wrote:
>
> 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
Cody F. (Guest)
on 2005-12-26 00:07
(Received via mailing list)
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 S. <removed_email_address@domain.invalid> wrote:
> > > > I want to reset fields after 'submit' in .rjs.
> > that it does not support public instance methods #call, #delay, etc.
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
http://www.codyfauser.com
Sam S. (Guest)
on 2005-12-26 02:34
(Received via mailing list)
Cody,

On 12/25/05, Cody F. <removed_email_address@domain.invalid> 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
Hiroshi T. (Guest)
on 2005-12-26 07:41
(Received via mailing list)
Cody

On Sun, 25 Dec 2005 19:34:13 -0500
Sam S. <removed_email_address@domain.invalid> wrote:

> 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 T. <removed_email_address@domain.invalid>
Cody F. (Guest)
on 2005-12-26 08:38
(Received via mailing list)
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 S. <removed_email_address@domain.invalid> wrote:
> 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
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
http://www.codyfauser.com
Cody F. (Guest)
on 2005-12-26 11:11
(Received via mailing list)
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 T. <removed_email_address@domain.invalid> wrote:
> > > What Sam says is the case at the moment.  I haven't had time to add
>
> Hiroshi T. <removed_email_address@domain.invalid>
>
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
http://www.codyfauser.com
Hiroshi T. (Guest)
on 2005-12-26 18:28
(Received via mailing list)
Cody,

On Mon, 26 Dec 2005 04:09:30 -0500
Cody F. <removed_email_address@domain.invalid> 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 T. <removed_email_address@domain.invalid>
Niaz A. (Guest)
on 2007-07-24 20:30
(Received via mailing list)
Hi,
The url http://www.fclonline.com/Articles/ClearAllFieldsinaDiv.html is
not
found. Is there any updated link?


Jan P. wrote:
>>
>
> Regards
> Jan P.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>

--
View this message in context:
http://www.nabble.com/how-to-form.rest-in-RJS-tf79...
Sent from the RubyOnRails Users mailing list archive at Nabble.com.
This topic is locked and can not be replied to.