View Single Post
Old 11-09-2010, 07:55 AM  
TheSwed
Confirmed User
 
TheSwed's Avatar
 
Join Date: Feb 2004
Location: Sweden.
Posts: 3,483
Quote:
Originally Posted by SmokeyTheBear View Post
it should work fine, as long as your banner urls are full urls
hmm..tried that but site2.com want to download javascript.php
Code:
var scriptfolder = "http://site1.com/js/";
var mdt = document.title;
var title = mdt.toLowerCase().replace(/^\s+|\s+$/g, "").replace(/[_|\s]+/g, "-").replace(/[^a-z0-9-]+/g, "").replace(/[-]+/g, "-").replace(/^-+|+$/g, "");
sij = scriptfolder + title + ".js";
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= sij;
head.appendChild(script);
TheSwed is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote