X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=openx.js;h=34993451a2c565b79b037c439fb8db975c658927;hb=bcf3be2e38ab96a41118a23e7e96db59655de733;hp=a01c775a47f2b20a5118de83f7a3f29418fb9f85;hpb=32c1a348b266f53ecf91ba684841ca8472f4c649;p=openx diff --git a/openx.js b/openx.js index a01c775..3499345 100644 --- a/openx.js +++ b/openx.js @@ -12,7 +12,8 @@ count = 0, slots = {}, queue = [], - ads = []; + ads = [], + output = []; openx.show_ads = function(server, zones) { @@ -73,6 +74,8 @@ while (ads.length > 0) { + var result, src, inline, i; + id = ads.shift(); node = slots[id]; @@ -80,7 +83,17 @@ // node.append(id + ": " + node.attr('class')); - var result, src, inline; + /** + * If output was added via document.write(), this output must be + * rendered before other banner-code from the OpenX-server is rendered! + */ + if (output.length > 0) { + output.push(OA_output[id]); + OA_output[id] = ""; + for (i=0; i