Insert Javascript in a node 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 :

&lt;?php include('sites/all/scripts/countdown.js'); ?&gt;

&lt;script type="text/javascript"&gt;
y: 2012; m: 5; d: 25; h: 10; m: 0; s: 0;
&lt;/script&gt;

&lt;div id="countdown"&gt;&lt;/div&gt;


Any ideas ?

thanks a lot
Javascript happens on the client-side so there's no need to use PHP at all here. Using the PHP filter is in fact strongly discouraged as it introduces potential security risks.

To include javascript in an HTML page you use the &lt;script&gt; tag like so:

&lt;script type="text/javascript" src="/sites/all/scripts/countdown.js"&gt;&lt;/script&gt;