Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript document.write in IE 8
    primarykey
    data
    text
    <p>This is doing my head in, been chasing it all day. We have an ad server that calls a script on our site which then inserts code.</p> <p>E.g. Adserver page called in an iframe:</p> <pre><code>&lt;html&gt; &lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt; &lt;body&gt; &lt;script src="http://adserver/ad?s=728x90"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The javascript returned by the script call above:</p> <pre><code>document.write('&lt;script type=\'text/javascript\' src=\'http://partner.googleadservices.com/gampad/google_service.js\'&gt;\n'); document.write('&lt;/script&gt;\n'); document.write('&lt;script type=\'text/javascript\'&gt;\n'); document.write('GS_googleAddAdSenseService("ca-pub-xxxxxxxxxxxxxxxxxxx");\n'); document.write('GS_googleEnableAllServices();\n'); document.write('&lt;/script&gt;\n'); document.write('&lt;script type=\'text/javascript\'&gt;\n'); document.write('GA_googleUseIframeRendering();\n'); document.write('&lt;/script&gt;\n'); document.write('\n'); document.write('&lt;script type=\'text/javascript\'&gt;\n'); document.write('GA_googleFillSlotWithSize("ca-pub-xxxxxxxxxxxxxxxxxx", "Global_728x90", 728, 90);\n'); document.write('&lt;/script&gt;\n'); </code></pre> <p>This inserts Google Ad Manager ads onto our page. Problem is that the code doesn't work in IE 7 and 8, but works fine in Chrome, Firefox, Safari etc.</p> <p>The "error" returned by IE is "Object Expected" and running it through IE's "Developer tools" doesn't help either.</p> <p>I've tried a ton of things to get it working, splitting up the <p>It seems the error is happening whenever a GS_ or GA_ function is run, so I suspect IE is trying to stop external scripts from writing to the page?</p> <p>Can anyone shed some light why the error is happening or a solution?</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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