Assuming the JS is in a view (not a .js file) if ( {{=xxx}}=='True'){
should work but probably does not do what you want. My guess is that you want if ( "{{=xxx}}"=='True'){ or {{import gluon.contrib.simplejson as sj}} if ( {{=js.dumps(xxx)}}==true){ check the source if the generated output from the browser. Massimo On Apr 7, 9:11 pm, Monty808 <davidmontgom...@gmail.com> wrote: > Hi, > > I tried to use {{=xxx}} in javascript tags but it did not work. e.g. > > if ( {{=xxx}}=='True'){ > > } > > What do I do? > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---