[web2py] Re: ajax need to return 4 values

2015-11-15 Thread lucas
ok, i went with qQuery.getJSON. here is how i did it and it works great. JSON trading is cool. just for sharing: under the default controller's function, i have a section where i implement the javascript/jQuery code via an onchange of a select input. the select input is meant to prepopulate

[web2py] Re: ajax need to return 4 values

2015-11-14 Thread Anthony
The third argument to ajax() can be the id of a target element, but it can also be ":eval" or a Javascript function. If you use ":eval", you can return any Javascript code, and it will be eval'ed -- so just generate the code necessary to update the four inputs (e.g., "$('#input1').val(value1);

[web2py] Re: ajax need to return 4 values

2015-11-14 Thread Paolo Valleri
There isn't a solution out-of-the-box in web2py. I'd suggest returning a json with the 4 values, and then apply the result to the input fields Paolo On Saturday, November 14, 2015 at 1:50:56 PM UTC+1, lucas wrote: > > hello one and all, > > how do i run an ajax function under an onchange of a se