On Thursday, June 23, 2011 11:19:16 AM UTC-4, Richard wrote:
>
> Hello Anthony,
>
> I can't use a var like you suggest since it popup in the component for
> noting...
>
I'm not quite sure what you mean. Presumably you could add some logic to the
controller or view.
>
> I am using session.MYVAR that seems to work... But I don't find the way to
> get session vars in jQuery I try like this :
>
> <script>
> $(function() {
> var $tabs = $( "#tabs" ).tabs();
> var test1 = "{{=session.test1}}"; # OR like this :
> <%{{=session.test1}}%> and with and without quote or double quote...
> $tabs.tabs('select', test1);
> return false;
> });
> </script>
>
Is the value of session.test1 getting inserted in your jQuery code properly?
In that case, I suppose the issue is figuring out the jQuery code, not the
web2py code. If session.test1 isn't getting inserted properly, what are you
seeing there?
Anthony