I imagine someone has asked this but couldn't find it from my searches.
Anyway, I want to set a javascript variable to the current session variable
at time of execution of the javascript, not at time when it's loaded. So I
can't just do:
<script>
... blah ...
function() {
if ( certain_condition = True ) {
var myjsvar={{=session.myvar}};
alert(myjsvar);
}
}
... blah ...
</script>
because that will not be correct when the function executes.
I tried an ajax call to a controller callback, that in turn returns
"$('#myjsvar').val('%d');" % session.myvar, based loosely on a thread I
read here, but that didn't come close to working, either.
--