How to use SMARTY variables in JavaScript

This is a simple example of how to use Smarty variables in JavaScript.


{literal}

     <script>

          $(window).load(function() {  var sample='/sample.php?v=<strong>{/literal}{$smarty_variable}{literal}</strong>';  });

    &lt;/script&gt;

{/literal}

Bookmark and Share

Leave a Reply


You must be logged in to comment.