Quote:
Originally Posted by pilsnermonkey
document.write obsolete? Oh brother ... it's working for my purposes in this instance so I will not temp fate at this time. Cheers.
|
Netscape 3 is the most recent browser where there isn't a better way to interact with the web page from JavaScript than to use document.write so it has effectively been obsolete since that browser died 10+ years ago.
With all current browsers you can use either innerHTML which resolves most of the problems that document.write had or you can use the many DOM commands that make up about 60% of JavaScript that even get around the few problems that still exist with innerHTML.
No one should be being taught document.write any more as even browser dinosaurs such as Netscape 4 and IE4 had their own far better ways of interacting with the web page from JavaScript.
document.write is history - not programming.