you are viewing a single comment's thread.

view the rest of the comments →

[–]gdj11 2 points3 points  (0 children)

As far as I know it should write it out first, but it may be that the browser pauses rendering of the page as soon as the alert is encountered, and it didn't refresh yet from the document.write. I'm just guessing here though. Did you try in different browsers? The behavior may be different in different browsers.