globalEval() wasn't working properly in Firefox 3.6.x occasionally, so I pulled the latest version from jQuery 1.6.2. doc.write()'ed ads were getting inserted into the wrong part of the page.
globalEval() wasn't working properly in Firefox 3.6.x occasionally, s…
…o I pulled the latest version from jQuery 1.6.2. doc.write()'ed ads were getting inserted into the wrong part of the page.
globalEval should only be called for inline and same domain scripts. i.e., scripts you control. Can you not remove the document.write calls?
It is only calling globalEval() on inline and same domain scripts. Most of these scripts aren't using doc.writes, but it's the resulting scripts down the line which do the doc.writes. For example, we asynchronously load OAS ad code (which loads a function which does doc.write), and then call the functions using replaceWrite('#foo', ''). That inline script gets run with globalEval(). Not sure why, but in Firefox 3.6, that will sometimes result in the output of that being appended to the end of the document instead of replacing '#foo'.
Using jQuery 1.6.2's globalEval() code fixes it in Firefox 3.6 (it was fine in all other browsers [IE6-9, Firefox 6, Opera 11, Safari 5.1, Chrome 13]).
If you take a look at 0777b7e, this may be related to how we dynamically insert script tags. We should be inserting the script tag before the placeholder div.
Try this branch:
Sorry, busy with another project at the moment, but will revisit this issue later.
Closing this issue. Feel free to reopen with a test case.