On 15/06/05, Joshua Bates <joshua-q0Yur7km1XpBDgjK7y7TUQ@public.gmane.org>
wrote:> I''m trying to submit an ajax form from the :onfinish of a
> form_tag_with_upload_progress,
> eg :onfinish => "$(''formid'').submit()"
>
> The problem is it submits the form and reloads the page, instead of
> making the ajax call
>
> Is there any way around this? or am I just doing something wrong....
Running the submit() method of a form bypasses any JavaScript and
submits it like a normal form. You need to do
$(''formid'').onsubmit()
to run the JavaScript handler.
--
Phillip Hutchings
http://www.sitharus.com/
sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org /
sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org