|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
document.write problem
why is it that sometimes when i use document.write to print a text or anythings else it clears up the document and writes it in a new page...what am i doing wrong...thanx in advance..
|
|
#2
|
||||
|
||||
|
I believe putting your script inside the <head> tags would cause this
Do you have an example of when this happens? I assume it has to do with the placement of your document.write... |
|
#3
|
||||
|
||||
|
Yep, document.write in a script in the head tags rewrites the whole document body. Document.write in scripts placed within the body just write text in-line.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#4
|
|||
|
|||
|
Thanks for that tip.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > document.write problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|