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

Andrew Gibson andyg at ihug.co.nz
Wed Jun 27 05:16:21 CDT 2001


Well, I tend to think of if it as a page within a page in the same window.

ie

<html>
<!--other required tags in CSS to define the divs-->

<div id =div1>Content1</div>
<div id =div2>Content2</div>
<div id =div3>Content3</div>
</html>

Then using Javascript you can manipulate the divs, hide them, move them,
write
to them etc.

Andrew GIbson

 > Hi,
 >   So would i be correct in saying that a <div> tag is like a whole new
 > window?
 >
 > -----Original Message-----
 > From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
 > Behalf Of Peter-Paul Koch
 > Sent: Wednesday, 27 June 2001 7:25 PM
 > To: javascript at LaTech.edu
 > Subject: RE: [Javascript] netscape: how to write to <div> tag??
 >
 >
 >
 > >    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.
 >
 >
 > _______________________________________________
 > Javascript mailing list
 > Javascript at LaTech.edu
 > http://www.LaTech.edu/mailman/listinfo/javascript
 >
 >
 > _______________________________________________
 > Javascript mailing list
 > Javascript at LaTech.edu
 > http://www.LaTech.edu/mailman/listinfo/javascript
 >





More information about the Javascript mailing list