Thanks Fred. Do you know of a way to submit a form through js and have it honor the observers? I would prefer not to alter the 3rd party code. This could be problematic for future upgrades.
On Jul 1, 11:31 am, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote: > That is correct, submit observers are not called when you call > form.submit(). If you need to be able to call form.submit() as well as trap > the user submission mechanism, you need to factor out your code into > something you can call from both places. > > -Fred > > On Tue, Jul 1, 2008 at 10:28 AM, louis w <[EMAIL PROTECTED]> wrote: > > > I have a form which contains widgEditor (http://www.themaninblue.com/ > > experiment/widgEditor/<http://www.themaninblue.com/experiment/widgEditor/>) > > elements. This script adds onsubmit calls to > > the form to clean itself up before submitting values. > > > The problem arises when I try to submit the form through javascipt > > with $(form).submit();. When this happens it does not fire any of the > > onSubmit functions which widg added. This works fine if i submit the > > form through a normal submit button. > > -- > Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---