Event.observe(form, "submit", function(ev) {
    el = Event.element(ev);
    data = Form.serialize(el);
    new Ajax.Request(el.getAttribute("action"), {
       method:"post",
       postBody:data
    });
    Event.stop(ev);
});

Something like that.

-Rob

Ben Anderson wrote:

>Hi,
>Is it possible to submit my form (or part of my form) with an ajax
>request?  I had been using dojo to do this, but having just read up on
>the prototype library, I think I'd rather use prototype.  The one
>thing I don't see (maybe I'm just missing it) is the ability to submit
>my form (actually just parse through an element and include all inputs
>as request parameters) with my request.  Can I do this?
>Thanks,
>Ben
>_______________________________________________
>Rails-spinoffs mailing list
>Rails-spinoffs@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>  
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to