Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Banners on silverstripe


Go to End


10 Posts   3630 Views

Avatar
HanSolo

Community Member, 87 Posts

13 August 2008 at 5:18am

Hi I tried to put the script in CDATA block but got an error on that

Fel: uncaught exception: [Exception... "Operation is not supported" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://www.topgear.se/ Line: 286"]

Anyone got an idea on this?

Joakim

Avatar
Josh

SilverStripe Developer, 65 Posts

13 August 2008 at 9:14am

Edited: 13/08/2008 9:14am

Hello,

I use quite a few JS banner scripts on my SilverStripe sites.

Simply include the JS file in the necessary template. Disable content negotiator in mysite/_config.php and everything should work fine :)

// For JavaScript, Xml and DocType
ContentNegotiator::disable();

You should also be placing your JavaScript code in mysite/javascript and never edit code in sapphire or cms.

Cheers

Go to Top