How to form.rest in RJS

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. [email protected]

On 12/23/05, Hiroshi T. [email protected] 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 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.

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.

On Fri, 23 Dec 2005 10:09:41 -0600
Rick O. [email protected] wrote:

On 12/23/05, Hiroshi T. [email protected] 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. [email protected]

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. [email protected] wrote:

I want to reset fields after ‘submit’ in .rjs.
that it does not support public instance methods #call, #delay, etc.
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


http://www.codyfauser.com

Hi,

On 12/25/05, Hiroshi T. [email protected] 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

On Sun, 25 Dec 2005 19:34:13 -0500
Sam S. [email protected] 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. [email protected]

Cody,

On 12/25/05, Cody F. [email protected] 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 S. [email protected] 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
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


http://www.codyfauser.com

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. [email protected] wrote:

What Sam says is the case at the moment. I haven’t had time to add

Hiroshi T. [email protected]


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


http://www.codyfauser.com

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
[email protected]
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.

Cody,

On Mon, 26 Dec 2005 04:09:30 -0500
Cody F. [email protected] 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. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs