Environment: Windows XP SP3 XAMPP, PHP 5.2.8, Apache 2.2.11
SilverStripe version: /branches/2.3
In my customised version of mysite/code/Page.php in the init() method, whenever I make a call to Requirements::javascript, the following always end up being included in the outputted HTML.
<script type="text/javascript" src="http://development.surferscentury.com.au/jsparty/behaviour.js?m=1231497686"></script>
<script type="text/javascript" src="http://development.surferscentury.com.au/jsparty/prototype.js?m=1231381869"></script>
<script type="text/javascript" src="http://development.surferscentury.com.au/sapphire/javascript/i18n.js?m=1231381787"></script>
<script type="text/javascript" src="http://development.surferscentury.com.au/sapphire/javascript/lang/en_US.js?m=1231381787"></script>
<script type="text/javascript" src="http://development.surferscentury.com.au/themes/surferscentury/js/jquery-1.3.1.min.js?m=1232688508"></script><script type="text/javascript" src="http://development.surferscentury.com.au/themes/surferscentury/js/swfobject.js?m=1232617897"></script><script type="text/javascript" src="http://development.surferscentury.com.au/jsparty/behaviour.js?m=1231497686"></script><script type="text/javascript" src="http://development.surferscentury.com.au/jsparty/prototype.js?m=1231381869"></script><script type="text/javascript" src="http://development.surferscentury.com.au/sapphire/javascript/i18n.js?m=1231381787"></script><script type="text/javascript" src="http://development.surferscentury.com.au/sapphire/javascript/lang/en_US.js?m=1231381787"></script><script type="text/javascript">//<![CDATA[
Behaviour.register({
'#switchView a' : {
onclick : function() {
var w = window.open(this.href,windowName(this.target));
w.focus();
return false;
}
}
});
function windowName(suffix) {
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
return base + suffix;
}
window.name = windowName('site');
//]]></script>
Why is this?
Calling Requirements::clear() doesn't work because as soon as I include any javascript via the Requirements:javascript() method, I cannot stop the above output?
How can I stop this happening as I want control over what JavaScript files do and do not display.