Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe IE needs the <code>temp1</code> DIV to be ended before writing the script element:</p> <pre><code>&lt;script type="text/javascript"&gt; document.write('&lt;div id="temp1"&gt;&lt;' + '/div&gt;'); document.write("&lt;scr" + "ipt type=\"text/javascript\"&gt;\nif(typeof(cachebuster) == \"undefined\"){var cachebuster = Math.floor(Math.random()*10000000000)}\nif(typeof(dcopt) == \"undefined\"){var dcopt = \"dcopt=ist;\"} else {var dcopt = \"\"}\nif(typeof(tile) == \"undefined\"){var tile = 1} else {tile++}\ndocument.write('&lt;scr'+'ipt src=\"http://ad.doubleclick.net/adj/shz.bloomington/home;pos=728x90_1;' + dcopt + ';tile=' + tile + ';sz=728x90;ord=' + cachebuster + '?\"&gt;&lt;/scr'+'ipt&gt;');\n&lt;/scr" + "ipt&gt;"); &lt;/script&gt; </code></pre> <p><strong>EDIT</strong> (in response to your comment):</p> <p>Since you want the ad script to go inside the div, you will have to put <code>document.write</code> aside and create the script programmatically, so you can simply call <code>appendChild</code> to put it into the div: </p> <pre><code>&lt;script type="text/javascript"&gt; document.write('&lt;div id="temp1"&gt;&lt;' + '/div&gt;'); if(typeof(cachebuster) == "undefined") { var cachebuster = Math.floor(Math.random() * 10000000000); } if(typeof(dcopt) == "undefined") { var dcopt = "dcopt=ist;"; } else { var dcopt = ""; } if(typeof(tile) == "undefined") { var tile = 1; } else { tile++; } var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://ad.doubleclick.net/adj/shz.bloomington/home;pos=728x90_1;" + dcopt + ";tile=" + tile + ";sz=728x90;ord=" + cachebuster + "?"; divTemp.appendChild(script); &lt;/script&gt; </code></pre> <p>Please note that I cannot be 100% sure I did not make some typo while reformatting the script, with all those escaped sequences...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload