Using Javascript codes in Smarty template files
Posted on July 10, 2010
Filed Under PHP, Smarty | 1 Comment
Using Smarty fist problem I encountered is how to use JavaScript inside the template files! There is this magic keyword literal which will refrain from parsing the code within!
{literal}
<script type="text/javascript">
function isblank(field) {
if (field.value == '')
{ return false; }
else
{
document.loginform.submit();
return true;
}
}
</script>
{/literal}Comments
One Response to “Using Javascript codes in Smarty template files”
Leave a Reply
that’s all cool coding tip, thank you very much for sharing.