On 07/30/2012 10:55 AM, Curiouslearn wrote:
> 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.
Make an ajax call using $.getScript() encoding the variables you want in
the request as args or vars like
$.getScript({{=URL('gen_javascript')}}/my_js_variable1/my_js_variable2)
your server side gen_javascript function will generate the correct
javascript and $.getScript() will run it.
--
Vincenzo Ampolo
http://vincenzo-ampolo.net
http://goshawknest.wordpress.com
--