Hi.
I'm trying to pass some (smarty)variables to a javascript, but cannot find a solution. I'm doing this in a specific module, but I guess the problem is global. Any tips on how to achieve this?
Smarty to javascript. Is it possible?
Re: Smarty to javascript. Is it possible?
And would you mind explaining how you do it?
Where do you use your JavaScript?
{literal}
.... some javasdcript code{/literal}
{$your_smarty_var}
{literal}
.... the rest of your javascript...
{/literal}
or replace all curly brackets in your js { } with {ldelim} and {rdelim}, if it's not a huge chunk of js.
Where do you use your JavaScript?
{literal}
.... some javasdcript code{/literal}
{$your_smarty_var}
{literal}
.... the rest of your javascript...
{/literal}
or replace all curly brackets in your js { } with {ldelim} and {rdelim}, if it's not a huge chunk of js.
Re: Smarty to javascript. Is it possible?
Of course... the easy and obvious way works.
Thank you so much!
Thank you so much!