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" <[email protected]> wrote:
> I'll submit a patch.
>
> On Aug 27, 9:59 pm, Jose <[email protected]> wrote:
>
> > On 28 ago, 01:44, "mr.freeze" <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---