On Jul 10, 4:45 am, Tom Gregory <[EMAIL PROTECTED]> wrote:
> On Jul 9, 2007, at 6:17 AM, jenner wrote:
>
> > I've tried
> > Form.reset('formName') in it's own JS function and trying to run after
> > my Ajax.Updater completes, but it is not working.

To use Form.reset() you should use an ID, not a name.  If you want to
use the form name, use:

 document.forms['formName'].reset();


> That's because the reset() function is native to the form object, not
> a Prototype add on.
>
> $('formId').reset() works just fine for me.

Actually, it's both native and a Prototype.js add-on.  About line 2618
in v1.5.1:

var Form = {
  reset: function(form) {
    $(form).reset();
    return form;
  },


--
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to