Hi,
I want to know how to show javascript using smarty variable.
$jscode ="
<script>
alert('hi');
</script>
";
assign('CODE',$jscode)
In smarty file
{$CODE}
Currently it shows javascript code instead executing it.
Any Idea?
-Thanks
Hi,
I want to know how to show javascript using smarty variable.
$jscode ="
<script>
alert('hi');
</script>
";
assign('CODE',$jscode)
In smarty file
{$CODE}
Currently it shows javascript code instead executing it.
Any Idea?
-Thanks
Probably you have auto escaping turned on. Try the nofilter
modifier.
Thanks
This solution works.
{$CODE|escape nofilter}
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.