Re: [web2py] Re: component form without submit button

2015-09-21 Thread Manuele Pesenti
Il 21/09/15 17:16, Anthony ha scritto: > Instead, try changing this.form.submit() to > jQuery(this.form).submit(). That will wrap the form in a jQuery object > and call the jQuery "submit" method, which will trigger the trap_form > handler, which will submit the form via Ajax. Great!! It's works as

Re: [web2py] Re: component form without submit button

2015-09-21 Thread Anthony
> > INPUT(_type="text", _class="form-control", _name="tip", > _onchange="this.form.submit();", > _oninput="this.onchange();"), > The problem is that above, this.form is the native DOM form element (not a jQuery object), so the this.form.submit() is calling the form

Re: [web2py] Re: component form without submit button

2015-09-21 Thread Niphlod
btw: inline javascript trumps any event attached NEVER inline javascript snippets! On Monday, September 21, 2015 at 4:15:48 PM UTC+2, Anthony wrote: > > Have your put that inside a web2py Ajax component? Can you show the full > code of the parent controller and view? > > Anyway, as an altern

Re: [web2py] Re: component form without submit button

2015-09-21 Thread Anthony
Have your put that inside a web2py Ajax component? Can you show the full code of the parent controller and view? Anyway, as an alternative, you might want to take the approach shown here: http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Auto-completion Anthony On Monday, September

Re: [web2py] Re: component form without submit button

2015-09-21 Thread Manuele Pesenti
Il 21/09/15 15:03, Manuele Pesenti ha scritto: > def _index(): > form = FORM( > DIV( > INPUT(_type="text", _class="form-control", _name="tip", > _onchange="this.form.submit();", > _oninput="this.onchange();" # COMMENT OUT THIS LINE > ), >

Re: [web2py] Re: component form without submit button

2015-09-21 Thread Manuele Pesenti
Il 21/09/15 14:36, Niphlod ha scritto: > uhm... if the component has been loaded with web2py's facilities, then > a form.submit should be "intercepted"/"handled" by > > https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py.js#L266 You can try inserting this little code