I personally would not use Joomla, if I had to I’d probably go seek in the code to find that piece of code and destroy it with my laser gun.
But, a quick ‘n’ dirty fix might be output buffering
in PHP, you can use this to catch the entire contents of a page, do your magic in there, and then output it to the browser. So in your case, you could use it to find/replace/remove the document.write’s.
Do I advise this approach? No, but if you truely can’t touch the generated code (and I wouldn’t know, so trusting your judgement), you don’t have many options left.
7
solved Javascript replace document.write(ln) with jquery hotfix