document.write() problem

liunx

Guest
I try using the document.write() function in my webpage. I usually do this in the form of input buttons and links that trigger "document.write()". However, sometimes it inserts the stuff inside document.write() into the page, and other times it erases everything on the page and puts in the text inside document.write() in a new page (in which case the Back history button can be pressed to reverse the effect). I just never know what it will do! :confused: How do I control when document.write() is triggered, if it writes the text in a new page, or just inserts it to the text already on the page? :rolleyes: Please help<!--content-->If you are using the document.write() function in the head section, that might be one of the reasons why it is overwriting the page. I have had this problem too and I am not quite sure how to fix it either. I think if you use two or more document.writes consecutively, it overwrites the page.<!--content-->
 
Back
Top