hi,
thanks for looking,
when i use document.write, the whole pages goes blank and only displays the ad.
function __adthis(id) {
$.getJSON('banner.php', function (data) {
var adNum = Math.floor(Math.random() * data.ban.length);
document.write("<SCRIPT TYPE='text/javascript'> SRC='+data.ban[0].link+'><\/SCRIPT>");
});
}
this is a test, this is a test, this is a test, this is a test,
<div id="res"><script>`__adthis();`</script></div>