<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>Sure!</DIV> <DIV> </DIV> <DIV>In IE you can use any element to write inside of it.</DIV> <DIV> </DIV> <DIV><STRONG><div ID="newContent" style="color:red">The old text otherwise left empty?!<br></div></STRONG></DIV> <DIV><STRONG></STRONG> </DIV> <DIV>If you like to have it positioned and formated as previously defined you do it in you're </DIV> <DIV><STRONG><style></STRONG></DIV> <DIV><STRONG></style></STRONG></DIV> <DIV>element.</DIV> <DIV> </DIV> <DIV>If only this element uses this format refer it from it's ID like this:</DIV> <DIV><STRONG>#newContent{position:absolute/relative</STRONG></DIV> <DIV><STRONG> Top:</STRONG></DIV> <DIV><STRONG> Left:</STRONG></DIV> <DIV><STRONG> Font:</STRONG></DIV> <DIV><STRONG> Background:</STRONG></DIV> <DIV><STRONG> color:</STRONG></DIV> <DIV><STRONG> ...etc...</STRONG></DIV> <DIV><STRONG> }</STRONG></DIV> <DIV>If the DIV is empty</DIV> <DIV> Try using: </DIV> <DIV> <STRONG>newContent.innerText="the fool content";</STRONG></DIV> <DIV>...through JavaScript function.</DIV> <DIV>If the div is not empty and you like to add the new content without wiping the current</DIV> <DIV> Try using: </DIV> <DIV> <STRONG>newContent.insertAdjacentText('AfterBegin/BeforeEnd', 'the content' )</STRONG></DIV> <DIV>Depending on wether you like the new content to apear after or before the older text you will chose <EM><STRONG>AfterBegin</STRONG></EM> or <STRONG><EM>BeforeEnd, </EM></STRONG>sametime preserving the formating you've specifyed in you're CSS.</DIV> <DIV> </DIV> <DIV>Otherwise [!more control], If you like to add a new content even a newer tag and separate content with different formating attributes</DIV> <DIV> Try using:</DIV> <DIV> <DIV> <STRONG>newContent.insertAdjacentHTML('AfterBegin/BeforeEnd', '<the tag and the style attributes>the content</the tag>' ) </STRONG></DIV> <DIV>or if you like to have completely new content element f.i. div,p,span, etc; rendered relative to the desired element before or after it (that is:outside)</DIV> <DIV> Try using: </DIV></DIV> <DIV> <DIV> <STRONG>newContent.insertAdjacentHTML('BeforeBegin/AfterEnd', '<the tag and the style attributes>the content</the tag>')</STRONG></DIV> <DIV><EM>* You can also use the ID or Class assignment to refer through the CSS formating in the style section instead the inlined style definition</EM></DIV> <DIV><EM>And now the function</EM></DIV> <DIV> <DIV><EM> <STRONG>function freshContent(){</STRONG></EM></DIV> <DIV><STRONG> <DIV><STRONG><EM> theContent="simply inserted newer text over the older one or if empty tag filling it with content"</EM></STRONG></DIV></STRONG></DIV> <DIV><STRONG><EM> theContent1=" inserted newer text over the older one <i>made italic.</i>"</EM></STRONG></DIV> <DIV><EM>//or if you like to have some extra formating inside the new text like underlined or bold even italic</EM></DIV> <DIV><STRONG><EM> theContent2="<br>This will be wrtitten formating this<b> bold</b> just before the old text<br>"</EM></STRONG></DIV> <DIV><EM>//but in case you like to have an extra tag that is only dependent in preceeding order, than you would do something like this:</EM></DIV> <DIV> <DIV><STRONG><EM> theContent3="<div id=before><u>This tag apears before the referencial tag underlined</u></div>"</EM></STRONG></DIV> <DIV><EM>//please format this new tags inside <style></style> part of document, -worthed for redability and flexibile control of it's future style changes</EM></DIV> <DIV> <DIV><STRONG><EM> theContent4="<br>This will be wrtitten formating this<b> bold</b> behind the old text"</EM></STRONG></DIV></DIV> <DIV> <DIV><STRONG><EM> theContent5="<div id=after><i>This tag apears after the referencial tag in italic</i></div>"</EM></STRONG></DIV> <DIV><STRONG><EM>//*********************************************************************************************************</EM></STRONG></DIV> <DIV><STRONG><EM> newContent.innerText=theContent</EM></STRONG></DIV> <DIV> <DIV><STRONG><EM> newContent.innerHTML=theContent1+"(The replaced text).<br>"</EM></STRONG></DIV> <DIV> <DIV><STRONG><EM> newContent.insertAdjacentHTML('AfterBegin', theContent2+"<BR>")</EM></STRONG></DIV> <DIV><STRONG><EM> newContent.insertAdjacentHTML('BeforeBegin', theContent3)</EM></STRONG></DIV> <DIV> <DIV><STRONG><EM> newContent.insertAdjacentHTML('BeforeEnd', theContent4+" <br>")</EM></STRONG></DIV></DIV> <DIV><STRONG><EM> newContent.insertAdjacentHTML('AfterEnd', theContent4)</EM></STRONG></DIV> <DIV><STRONG><EM> }</EM></STRONG></DIV> <DIV><EM>//insert comment signs before the first and second statement if you like to preserve the old text of the tag</EM></DIV> <DIV><EM>// when you're done, use any kind of event onclick onmouseover etc to execute it</EM></DIV> <DIV><STRONG><FONT color=#cc0000>PRECAUTION: </FONT><FONT color=#3300ff>CREATE SOME SCRIPT HANDLER FOR THE INSERTADJACENT BECAUSE IT EXECUTES E NEW LINE/TAG EVERY TIME YOU CALL THE FUNCTION, TRY USING ENABLE/DISABLE FOR BUTTONS</FONT></STRONG></DIV> <DIV><FONT color=#3300ff></FONT> </DIV> <DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV> <DIV>Cheers</DIV> <DIV><BR> </DIV> <DIV><BR></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt Arial; FONT-COLOR: black"><B>From:</B> Andrew Dunn</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B> Wednesday, June 27, 2001 4:21 AM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B> javascript@LaTech.edu</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B> RE: [Javascript] netscape: how to write to <DIV>tag??</DIV> <DIV><BR></DIV>Hi,<BR> is it possible to write stuff to parts of a page (like the div tag) after<BR>the page has loaded without causing the rest of the page to clear?<BR><BR>Andrew<BR><BR>-----Original Message-----<BR>From: javascript-admin@LaTech.edu [mailto:javascript-admin@LaTech.edu]On<BR>Behalf Of Andrew Gibson<BR>Sent: Wednesday, 27 June 2001 7:43 AM<BR>To: javascript@LaTech.edu<BR>Subject: RE: [Javascript] netscape: how to write to <div> tag??<BR><BR><BR>from memory I think you need to go<BR><BR>document.layers["div1"].document.write("hello")<BR>document.close()<BR><BR>Andrew Gibson<BR><BR>> I can write to <div id="div1"> in IE4, but not in<BR>> Netscape 4.7<BR>><BR>> I've tried the following without any success...please<BR>> help to write to NS 4 <div> ('layers'):<BR>><BR>> =========<BR>><BR>><BR>> <script language="JavaScript"><BR>> <!--<BR>> function layer() {<BR>> if (!document.all) {<BR>> document.layers["div1"].document.write("hello<BR>> NS");<BR>> } else if (document.all) {<BR>> document.all["div1"].innerHTML = "Hello IE";<BR>> }<BR>><BR>> }<BR>><BR>> // --><BR>> </script><BR>><BR>> =========<BR>><BR>> <a href="javascript:layer();">Click</a><br><BR>><BR>> <div id="div1"><BR>> div 1 layer<BR>> </div><BR>><BR>> =========<BR>><BR>> =====<BR>> --<BR>> Anthony E.<BR>> AP Web Design<BR>><BR>> __________________________________________________<BR>> Do You Yahoo!?<BR>> Get personalized email addresses from Yahoo! Mail<BR>> http://personal.mail.yahoo.com/<BR>><BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> http://www.LaTech.edu/mailman/listinfo/javascript<BR>><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></DIV>