[web2py] Re: Using the ajax function with the built-in form function

2014-02-02 Thread raferbop
Thanks Massimo, I tried it, but the output is still blank. The modified code is below. {{=form}} jQuery('input[name=price]','input[name=quantity]').keyup(function(){ajax('cost',['price'],['quantity'],'target');}); On Sunday, February 2, 2014 4:12:14 PM UTC-5, Massimo Di Pierro wrote: > > tr

[web2py] Re: Using the ajax function with the built-in form function

2014-02-02 Thread Massimo Di Pierro
try this: def product_form(): form = SQLFORM(db.product) if form.process().accepted: session.flash = 'form accepted' redirect(URL('next_page')) return dict(form=form) def total_cost(): price = request.vars.price quantity = request.vars.quantity total = i