Hi selecta, I've tried your patch and didn't work for me... I'm having the same problem... with 2 LOAD forms the submit behavior is intermitent.
Regards, Tito On Sat, Apr 23, 2011 at 3:57 AM, Tito Garrido <titogarr...@gmail.com> wrote: > Wow! I just posted a message about this problem... +1 ! > > I'm using 2 forms with LOAD on the same page and I got the same problem... > it doesn't work on the first submit. > > > > > On Wed, Apr 13, 2011 at 5:12 PM, selecta <gr...@delarue-berlin.de> wrote: > >> done http://code.google.com/p/web2py/issues/detail?id=232 >> >> On Apr 11, 3:44 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> >> wrote: >> > No objection in principle but need to check implementation. Can you >> > please open an issue on google code and upload your propose patch. >> > Thanks. >> > >> > Massimo >> > >> > On Apr 7, 4:46 am, selecta <gr...@delarue-berlin.de> wrote: >> > >> > >> > >> > > itsnt it annoying that when you have forms with multiple submit >> > > buttons in a web2py component the button that is clicked to submit the >> > > form is not submitted >> > > here is a fix for web2py_ajax.html >> > >> > > now you can have forms with 2 or more submit buttons/images in web2py >> > > components >> > >> > > diff -r 25822b3791e4 applications/welcome/views/web2py_ajax.html >> > > --- a/applications/welcome/views/web2py_ajax.html Mon Apr 04 >> 14:48:36 >> > > 2011 -0500 >> > > +++ b/applications/welcome/views/web2py_ajax.html Thu Apr 07 >> 11:44:37 >> > > 2011 +0200 >> > > @@ -72,9 +72,12 @@ >> > > jQuery('#'+target+' form').each(function(i){ >> > > var form=jQuery(this); >> > > if(!form.hasClass('no_trap')) >> > > + $("[type=submit],[type=image]", this).click(function(e){ >> > > + $(this).attr("was_clicked_to_submit","YES"); >> > > + }); >> > > form.submit(function(obj){ >> > > jQuery('.flash').hide().html(''); >> > > - web2py_ajax_page('post',action,form.serialize(),target); >> > > + web2py_ajax_page('post',action,form.serialize() + "&" + $ >> > > ("[was_clicked_to_submit=YES]").attr('name') + "=" + $ >> > > ("[was_clicked_to_submit=YES]").val(),target); >> > > return false; >> > > }); >> > > }); >> > > > > -- > > Linux User #387870 > .........____ > .... _/_õ|__| > ..º[ .-.___.-._| . . . . > .__( o)__( o).:_______ > -- Linux User #387870 .........____ .... _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:_______