[Javascript] netscape: how to write to <div> tag??

Peter-Paul Koch gassinaumasis at hotmail.com
Wed Jun 27 04:25:11 CDT 2001


>    Is is possible to write to parts of the page (like the div tag) without 
>clearing the page? If it is possible, is it possible to write HTML to that 
>section of the page?

Yes and yes. See http://www.xs4all.nl/~ppk/js/index.html?layerwrite.html for 
the script you need.

As to the other question: Can you append something to a div, it is possible 
in IE and NN6 by doing

innerHTML = innerHTML + '<P>The new stuff</P>';

As to Netscape 4, I'm not sure. Maybe it is when you leave out the close(). 
Anyway, you could always store the content of the DIV and then append the 
new content to the storage, then reopen the DIV and write the new content 
into it.

ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the Javascript mailing list