I can't figure out how to insert a javascript function inside a node.
It's a countdown script that uses an external js file and i need the function to be called from within a node. (each node will have a different countdown target date)
I set the input filter to php but it didn't work. All it does is printing the js file content as node content
I put the js file in a folder inside sites/all/scripts and here's how i use :
<?php include('sites/all/scripts/countdown.js'); ?>
<script type="text/javascript">
y: 2012; m: 5; d: 25; h: 10; m: 0; s: 0;
</script>
<div id="countdown"></div>
Any ideas ?
thanks a lot