I\'m getting some very weird behaviour:( i hope someone can help
Using xmlhttp request im getting a javascript file with document. write and it looks something like this
That's what write()
is doing, it writes inside a document. If the document is already closed(closed means completely loaded), write() will overwrite the document.
Solution is simple: don't use write() when the document is already loaded. Use DOM-methods like appendChild() or insertBefore() to inject new nodes.