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

Andrew Gibson andyg at ihug.co.nz
Tue Jun 26 21:03:52 CDT 2001


 > Hi,
 >    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?
 > 
 > Andrew

something like this for NS
 
document.layers["div1"].document.write("<b>hello</b>")
document.close()




> 
 > -----Original Message-----
 > From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
 > Behalf Of Andrew Gibson
 > Sent: Wednesday, 27 June 2001 7:43 AM
 > To: javascript at LaTech.edu
 > Subject: RE: [Javascript] netscape: how to write to <div> tag??
 > 
 > 
 > from memory I think you need to go
 > 
 > document.layers["div1"].document.write("hello")
 > document.close()
 > 
 > Andrew Gibson
 > 
 >  > I can write to <div id="div1"> in IE4, but not in
 >  > Netscape 4.7
 >  >
 >  > I've tried the following without any success...please
 >  > help to write to NS 4 <div> ('layers'):
 >  >
 >  > =========
 >  >
 >  >
 >  >   <script language="JavaScript">
 >  >   <!--
 >  >   function layer() {
 >  >     if (!document.all) {
 >  >       document.layers["div1"].document.write("hello
 >  > NS");
 >  >     } else if (document.all) {
 >  >       document.all["div1"].innerHTML = "Hello IE";
 >  >     }
 >  >
 >  >   }
 >  >
 >  >   // -->
 >  >   </script>
 >  >
 >  > =========
 >  >
 >  > <a href="javascript:layer();">Click</a><br>
 >  >
 >  > <div id="div1">
 >  > div 1 layer
 >  > </div>
 >  >
 >  > =========
 >  >
 >  > =====
 >  > --
 >  > Anthony E.
 >  > AP Web Design
 >  >
 >  > __________________________________________________
 >  > Do You Yahoo!?
 >  > Get personalized email addresses from Yahoo! Mail
 >  > http://personal.mail.yahoo.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
 > 




More information about the Javascript mailing list