[web2py] Re: call a function in another controller

2010-07-28 Thread ilovesss2004
I have solved the problem. Thanks alot to you all!

Re: [web2py] Re: call a function in another controller

2010-07-27 Thread Jean-Guy
I can't help you at this stage, but in the book there is a section for ajax and javascript recipe that could help. Jonhy On 2010-07-27 17:00, ilovesss2004 wrote: How to write it in javascript? e.g. onclick=URL(request.application,'controllerName','FunctionName.load'), ajax=True)? On Jul 27, 1

Re: [web2py] Re: call a function in another controller

2010-07-27 Thread Bruno Rocha
Take a controller called math.py def sum(): return 1+2 #returns 3 In any view $(document).ready(function(){ $('#button').click(function(){ ajax("{{=URL(r=request, c='math',f='sum.load')}}",'','target'); return false; }); }); CLICK HERE The last tip, could be wri

[web2py] Re: call a function in another controller

2010-07-27 Thread ilovesss2004
How to write it in javascript? e.g. onclick=URL(request.application,'controllerName','FunctionName.load'), ajax=True)? On Jul 27, 10:35 pm, Bruno Rocha wrote: > In a view: > > {{=LOAD(url=URL(request.application,'controllerName','FunctionName.load'), > ajax=True)}} > > 2010/7/27 ilovesss2004 > >