Nested document.writes and third party ads not working in IE!!!! Any workaround that is safe?
<p><strong>NOTE: I edited this with more info of what I am getting back from the third party.</strong></p>

<p>In a nutshell I have a task to include a JS ad tag that calls to our internal ad server mechanism which then retries a third party script that document.writes to their external file... it will not work in IE. Someone mentioned to me that nested document.writes will not work in IE. I have tried various things.. appendTo / writeln / breaking up the script tag / decoding the script tags etc.. nothing seems to work. Since this is somewhat new to me, perhaps I am overlooking the obvious.</p>

<p>This is what it looks like:</p>

<pre><code>my html:
&lt;script language="JavaScript" type="text/javascript"&gt;
   document.write('\x3Cscript type="text/javascript" src="_some_Path_to_internal_ad_server"&gt;\x3C/script&gt;';);
&lt;/script&gt;
</code></pre>

<p>That call ends up bringing in some code that looks like this: just as you see, no enclosing script tags.</p>

<pre><code>   tl1 = '989';
   tl2 = 'xnlll';
   document.write('&lt;script type=\"text/javascript\" src=\"_some_Path_to_third_party.js\"&gt;&lt;\/script&gt;');
</code></pre>

<p>Now, that "_some_Path_to_third_party.js" brings in some js code that has document.writes and document.writeln</p>

<p>I am writing this off the top of my head, so I don't remember exactly how the script tags are broken up, but I don't believe that is the issue. I believe it is the nested document.writes in IE. </p>

<p>I tried various things and even laid out my first script call right in my page. No document.writes -- just</p>

<pre><code>&lt;script language="JavaScript" type="text/javascript" src="_some_Path_to_internal_ad_server"&gt;
</code></pre>

<p>No dice.</p>

<p>BUT a direct call to the external js did work (removing my call to my internal ad server which subsequently calls the third party call), ala:</p>

<pre><code>&lt;script language="JavaScript" type="text/javascript" src="_some_Path_to_internal_ad_server"&gt;
</code></pre>

<p>Anyone have experience dealing with anything likes this and how to overcome it?</p>
