I suggest you don't send the entire form but just the state of the button you clicked. It will have much faster response.
Massimo On Aug 28, 12:28 am, "mr.freeze" <nat...@freezable.com> wrote: > I sent a patch to Massimo but for posterity, here is the fixed ajax > function and added an ajaxForm(url,formIndex,targetResponseID) > function that grabs the entire form (by index i so use 0 for single > form pages): > > function ajax(u,s,t) { > query = []; > for(i=0; i<s.length; i++) { > q = jQuery("#"+s[i]).serialize(); > if(q){query.push(q);} > } > jQuery.ajax({type: "POST", url: u, data: query.join("&"), success: > function(msg) { if(t==':eval') eval(msg); else jQuery("#" + t).html > (msg); } }); > > } > > function ajaxForm(u,i,t){ > frm = jQuery("form:eq(" + i + ")"); > query = 'undefined=' + i; > if (frm.length==1){query = frm.serialize();} > jQuery.ajax({type: "POST", url: u, data: query, success: function > (msg) { if(t==':eval') eval(msg); else jQuery("#"+t).html > (msg); } }); > > } > > On Aug 27, 10:01 pm, "mr.freeze" <nat...@freezable.com> wrote: > > > I'll submit a patch. > > > On Aug 27, 9:59 pm, Jose <jjac...@gmail.com> wrote: > > > > On 28 ago, 01:44, "mr.freeze" <nat...@freezable.com> wrote: > > > > > Did you try my altered ajax function? > > > > Works well!. You can add it to the trunk? > > > > Jose --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---