Is it possible to pass a javascript variable to python code in a
web2py view? The only questions and answers I have seen this in the
forum are about how to do this for the URL() function. I want to know
if this is possible for the "for" loop.
For example:
<script>
var numrows = 5;
{{for i in range(numrows):}}
//do something here
{{pass}}
</script>
The above does not work. Is there a way that above can be made to
work? If so, can above work for cases in which the javascript variable
is an array or a json object.
Thank you.
--