just wondering about ajax callback onchange for checkbox boolean e.g. *modules* if current.request.vars.action == 'adjust_factory': * #factory = current.request.vars['factory_%s' % id]* *factory = current.request.vars.factory* if factory == 'on': factory = 'None' session_order_product[id] = factory elif factory == 'None': factory = 'on' session_order_product[id] = factory
*views* {{if factory == 'on':}} <form> <input type="checkbox" name="{{='factory_%s' % id}}" value="{{=factory}}" checked onchange="ajax('{{=URL(link_callback, vars = dict(id = id, factory = factory, action = 'adjust_factory') ) }}', ['{{='factory_%s' % id}}'], ':eval' )" /> </form> {{else:}} <form> <input type="checkbox" name="{{='factory_%s' % id}}" value="{{=factory}}" onchange="ajax('{{=URL(link_callback, vars = dict(id = id, factory = factory, action = 'adjust_factory') ) }}', ['{{='factory_%s' % id}}'], ':eval' )" /> </form> {{pass}} why the bold part of code in modules is not work (the commented one), and the uncommented part is work ? any idea the reason for this? thanks and best regards, stifan -- 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.