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.

Template Questions /

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

Integration of advertising tags


Go to End


2 Posts   1782 Views

Avatar
Thomashv

Community Member, 35 Posts

22 September 2010 at 8:15pm

I'm running silverstripe version 2.4 with following encoding and doctype definition:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

Now I am trying to implement some tags from my advertising system AdvertPro, but I can't get the script part to work. It looks like this:

<script language="JavaScript" type="text/javascript">
<!--
document.write('<scr'+'ipt src="http://ads.advertpro.no/advertpro/servlet/view/banner/javascript/zone?zid=2&amp;pid=0&amp;random='+Math.floor(89999999*Math.random()+10000000)+'&amp;millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></scr'+'ipt>');
//-->
</script>

But the ads does not display. If I use the noscript advertising tags, it works... But then I get limited functionality to the zone.

Anyone having any ideas to how this can be solved?

Thanks! :)

Avatar
3dgoo

Community Member, 135 Posts

24 September 2010 at 1:05pm

Have your tried checking the console using firebug to see if any errors come up?

Try changing document.write() to alert() to make sure the correct code is being generated.