I wrote an autosave plugin a while back that automates autosaving fields.  It
doesn't submit the form at one time - instead it updates each field
immediately if they are changed.  I can find somewhere to post it if you
want to play with it.  

It gets called like the snippet below - I use ajaxCFC for ajax, but
$.post/$.get should work too.  When you use "this" in the function call it
refers to the element itself.  In editing forms I give my field ID's the
name "dbfieldname_primarykeyID" to make them easy to reference.  You could
also do tablename_fieldname_id if you really wanted to generalize the
backend function :)

        $('input:[EMAIL PROTECTED]').each( function() {
                $(this).autoSave(function(){
                        $.AjaxCFC({
                                url: "/active/admin/cfc/seminars.cfc", 
                                method: "updateAttendee", 
                                data: { field:this.id.split("_")[0],
                                        id:this.id.split("_")[1],
                                        value:this.value}, 
                                success: function(){}
                                });
                });
        });

Let me know if you're interested.


Dan Wilson wrote:
> 
> I am attempting to use the .serialize function to post a form via
> Ajax. The form is very large and has just about every type of form
> element possible. I was not clear on the semantics to select all form
> elements in a particular form and all the examples I found were for
> [EMAIL PROTECTED]
> 
> The use case is an autosave for the form. I looked at the form plugin
> and it seemed to want to take control of the form submit. In my use
> case I want to save the form in the background and let the user
> continue to work with the form.
> 
> 
> All help and advice is appreciated.
> 
> dw
> 
> 
> -- 
> "Come to the edge, he said. They said: We are afraid. Come to the
> edge, he said. They came. He pushed them and they flew."
> 
>  Guillaume Apollinaire quotes
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/serialize-form-tf3402789.html#a9480981
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to