Under certain circumstances, document.write can overwrite the entire page, since . This is because this function is only called after the page has been completely loaded. You can find more information about this here.
Please use the following code instead:
Code Block |
---|
document.getElementById(…).innerHtml = … |
...