Member:
Markus ⋅
Date: April 22, 2010, 01:26 PM
⋅ Subject: "Re: A new website - spanishinns.com"
For one-page-only javascript needs, including the javascript snippet on the page itself works fine. You may want to create a separate "invisible" unit (without any box) where you include the javascript to ensure it doesn't get filtered or fuxored up by TinyMCE if you use the editor.
Also, if you ever need to include CSS and Javascript files into the page header, you can also use the following:
$core['depend']['css'][] = "whatever/folder/stylesheet.css";
$core['depend']['js'][] = "templates/javascript/myscript.js";
The advantage of this, instead of hard-coding it into skin_wrappers.php, is you can control which CSS and JS files are loaded for each module. You can use the above lines anywhere where $core exists (which would be pretty much anywhere except in functions where it isn't declared for global scope) — I generally put these into module_core.php (such as for Store module in WWB).