Forum Moderators: open

Message Too Old, No Replies

Ajax+PhpAdsnew reloading div onclick

pure Ajax pages -> 1 impression per user

         

ironmike 755

2:26 pm on Feb 7, 2007 (gmt 0)

10+ Year Member



My first post!
Ok, i've got this code :

function insertScript(){
sHTML="<script language=JavaScript type=text/javascript><BR>";
var awrz_rnd = Math.floor(Math.random()*99999999999);
var awrz_protocol = location.protocol.indexOf('https')>-1?'https:':'http:';
var a = "<" + "script language='JavaScript' type='text/javascript' src='";
var b = awrz_protocol+"//cicciopaciccio.com/adjs.php?n=a3c01405";
var c = "&zoneid=917&source=leonardo-ilvalore-leaderboard&target=_blank";
var d = "&exclude=" + document.phpAds_used;
var e = "&loc=" + escape(window.location);
var f = (document.referer)? "&referer="+escape(document.referer) : "";
var g = '&r=' + awrz_rnd + "&ct0=" + escape(document.phpAds_ct0);
var h = "'><" + "/script>";
var finalSrc = sHTML + a+b+c+d+e+f+g+h;

var bann = document.getElementById("banner");//

bann.innerHTML = finalSrc;

}

in the body:
<BODY>
<DIV ID="banner"></DIV>
</BODY>

My questions:
-how can i reload the "banner" div at every user click on my pages?
-how can i call the insertScript()funcion inside the XMLHttpRequest()-or something like that - that ajax use?

Ps:sorry for the bad english...

ironmike 755

5:10 pm on Feb 7, 2007 (gmt 0)

10+ Year Member



Alternative:
if i put the phpAds script in iframe how can i reload the iframe at every"click" on my page? Please Help!