[web2py] Re: How to add variable in function which called inside ajax function

2018-09-05 Thread Константин Комков
Thank you, now I use it, becouse I haven't form only variables (delFo, delFac, delDir, delPr) in JavaScript: view: data = {fo : delFo, fac : delFac, direction : delDir, pr : delPr}; jQuery.ajax({ type: "POST", url: "deleteCompetition", data: 'data='+JSON

[web2py] Re: How to add variable in function which called inside ajax function

2018-09-04 Thread Dave S
On Tuesday, September 4, 2018 at 6:23:03 AM UTC-7, Константин Комков wrote: > > Hello, can you take advice can I send variables in web2py function - ajax > or I need to use jquery function. > Can somebody show example how to send variables with jQuery.ajax and get > answer from server (controll

[web2py] Re: How to add variable in function which called inside ajax function

2018-09-04 Thread Константин Комков
I saw it, I want to see controller вторник, 4 сентября 2018 г., 19:48:07 UTC+3 пользователь Joe Barnhart написал: > > > $.ajax({ > data: {a:2, b:3}, > url: "{{=URL('loadAdditonalInfo')}}", > success: my_success_fcn(ret) > )}; > > > Something like this, from memory... > > You can get more de

[web2py] Re: How to add variable in function which called inside ajax function

2018-09-04 Thread Joe Barnhart
$.ajax({ data: {a:2, b:3}, url: "{{=URL('loadAdditonalInfo')}}", success: my_success_fcn(ret) )}; Something like this, from memory... You can get more details at the jQuery website. It has excellent docs. Joe On Tuesday, September 4, 2018 at 6:23:03 AM UTC-7, Константин Комков wrote: >

[web2py] Re: How to add variable in function which called inside ajax function

2018-09-04 Thread Константин Комков
Hello, can you take advice can I send variables in web2py function - ajax or I need to use jquery function. Can somebody show example how to send variables with jQuery.ajax and get answer from server (controller and js in view). For example we have a = 2 and b = 3. I want to get from server a+b.