[web2py] Re: How to add python code to js

2015-09-10 Thread Vladimir Makarov
SOLVED! I was so stupid! Sorry. The decision is to add not just iterable values (ids=1,5,8) in request vars but make multiple request vars (ids=1&ids=5&ids=8). So the view code is: $(document).ready(function() { $("button").click(function(){ var selected_id = []; $.each(

[web2py] Re: How to add python code to js

2015-09-10 Thread Vladimir Makarov
*Another words, is there a way to select all rows form table that belongs all id in request vars* *http://___/promo3?ids=1,2,3* *It's easy to select promo3?ids=1. But I failed to select **ids=3,8,15 for example.* *Where am I wrong?* On Thursday, September 10, 2015 at 2:27:59 PM U

[web2py] Re: How to add python code to js

2015-09-10 Thread Vladimir Makarov
Trying to use window.location.href='{{=URL('promo3')}}' + '?' + $.param({ids: ids}); but the code is generated invalid link with additional symbols: http://__/_/promo3?ids*%5B%5D*=3 Some manipulations and the code is work perfectly: window.location.href="{{=URL('promo3_order_det'

[web2py] Re: How to add python code to js

2015-09-10 Thread Leonel Câmara
How about this: window.location.href='{{=URL('promo3')}}' + '?' + $.param({ids: ids}); -- 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