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 21, 2015 at 9:03:12 AM UTC-4, Manuele wrote: > > 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 in a controller of a brand new > application: > > def _index(): > form = FORM( > DIV( > INPUT(_type="text", _class="form-control", _name="tip", > _onchange="this.form.submit();", > _oninput="this.onchange();" # COMMENT OUT THIS LINE > ), > SPAN( > TAG.button( > "Run", > _type="submit", > _class="btn btn-default"), > _class="input-group-btn"), > _class="input-gourp"), > _class = "form-inline", > ) > if form.accepts(request,session): > session.flash = "Success!" > return dict(form=form, vars=BEAUTIFY(form.vars)) > > if the event callback definition is not commented out the whole page is > submitted and not only the component. > > I'm using web2py in the version: > 2.12.3-stable+timestamp.2015.08.18.19.14.07 > > thanks a lot > Best regards > > Manuele > > > > > On Monday, September 21, 2015 at 2:31:20 PM UTC+2, Manuele wrote: >> >> Hi *, >> I would like to realize a little one-text-field form and submit the >> typed value each time the content of the field is changed and its >> content is greater than 3 characters. The form is called inside a web2py >> component so run something like this.form.submit() as onchange callback >> is not the right solution because the whole page is submitted and not >> only the desidered content. >> >> can somebody help me please? >> >> Thank you very mutch >> Cheers >> >> Manuele >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.