what did not work? what is should do is add a click event to each
submit button and add a special property onclick
$("[type=submit],[type=image]", this).click(function(e){ $
(this).attr("was_clicked_to_submit","YES"); });
if the form is submitted it searches for that property
(was_clicked_to_submit) and adds this element to the variable list, if
you can it would be nice if you could debug it
look in firebug/dragonfly/... if was_clicked_to_submit is an attribute
of your submit button
maybe your submit button has a different type??


On Apr 23, 6:37 pm, Tito Garrido <[email protected]> wrote:
> 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 <[email protected]> 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 <[email protected]> wrote:
>
> >> donehttp://code.google.com/p/web2py/issues/detail?id=232
>
> >> On Apr 11, 3:44 pm, Massimo Di Pierro <[email protected]>
> >> 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 <[email protected]> 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).:_______

Reply via email to