PDA

View Full Version : How can I use javascripts on template file?



johnh
02-10-07, 12:47 PM
Hello,

When I use some javascripts on templates, it shows error and does not work. Also even I import on template files, it still..

How can I use any javascripts on template?

Thanks

Matt
02-10-07, 04:18 PM
Like this:


{literal}
<script language="JavaScript">
function myFunction() {
alert("Hi!");
}
</script>
{/literal}

The use of the literal tag in the template stops any curly brackets { being treated as template field names.

ozmo
03-08-07, 03:03 PM
cool... I need this one also :)

Ulysses
03-30-07, 01:25 AM
Snap! me three.