Quote:
Originally Posted by SmokeyTheBear
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);