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

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jun 28 04:28:50 CDT 2001


>Who is wrong about what?

>>He is wrong anyway. In IE there is nothing like <Layer> tag except
the <IFRAME>. There is some equivalency between
>layer in the NN and the IFrame in IE, but the tag is a tag, and it's 
>known>as HTML.
>Layer is analog to DIV but the logics of functioning are extremely
>different. Layer is a new NN document window layered inside, very much 
>alike the <input>, while the div is same as nothin it's a simple container 
>that does nothin(wery usefool indeed)

It's about a strict definition of a 'layer' (NN4 only tag that creates a new 
window in your page) vs. a loose definition of a 'layer' (any bit of the 
page that can be hidden, moved etc.)

I don't quite understand who's wrong about what either, but he says DIV's 
are, by themselves, not good for anything (which is true, but doesn't take 
the function of a DIV as a container for DHTML effects into account).

Anyway, never mind, this is just about definitions, not about real-life 
DHTML. Yes, you can see a layer (loosely defined as any bit of the page that 
can be hidden, moved etc.) as a separate window, especially in NN4 but to a 
lesser exent also in the other browsers.

ppk


>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
> >
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>http://www.LaTech.edu/mailman/listinfo/javascript
>
>
>
>
>
>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

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





More information about the Javascript mailing list