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.

Template Questions /

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

Integration of advertising tags

Go to End

2 Posts   1339 Views


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" "">
<html xmlns="" 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=";pid=0&amp;random='+Math.floor(89999999*Math.random()+10000000)+'&amp;millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></scr'+'ipt>');

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! :)


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.