Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 01-29-2004, 08:07 PM
  #1
xSKATEx
Aspirant (Level 2)
 
xSKATEx's Avatar
 
Join Date: Jan 2004
Location: Detroit
Posts: 13
iTrader: (0)
xSKATEx is on a distinguished road
Question document.writeIn()

Alright.......I recently found out the use of document.writeIn().....How do I get the document.writeIn() to add to my page(not delete everything and just show my document.writeIn()), kind of like a running tally.
xSKATEx is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-29-2004, 08:42 PM
  #2
n8thegreat
Super Deity (Level 18)
 
n8thegreat's Avatar
 
Join Date: Mar 2003
Location: Dallas
Posts: 1,031
iTrader: (0)
n8thegreat is on a distinguished road
use document.write()
__________________


I was voted Best Newcomer of 2003
Bow before me!
n8thegreat is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-30-2004, 12:06 AM
  #3
Willy Duitt
Catapulted
 
Willy Duitt's Avatar
 
Join Date: Sep 2003
Posts: 1,108
iTrader: (0)
Willy Duitt is on a distinguished road
Re: document.writeIn()

Quote:
Originally posted by xSKATEx
Alright.......I recently found out the use of document.writeIn().....How do I get the document.writeIn() to add to my page(not delete everything and just show my document.writeIn()), kind of like a running tally.
Firstly; it's document.writeln (small L)
As in WRITE LINE

Not document.writeIn (uppercase i)
As in WRITE IN

Secondly; both document.writeln and document.write will overwrite the document if invoked after the document has been loaded. What I think you are looking for is either, innerText which is IE proprietary or innerHTML which is supported by IE5+ and NS6+.

More info on writeln can be found here.

.....Willy
Willy Duitt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 01-30-2004, 08:07 PM
  #4
Jon Hanlon
Super Guru (Moderator)
 
Jon Hanlon's Avatar
 
Join Date: Jul 2001
Location: Sydney, Australia
Posts: 1,842
iTrader: (0)
Jon Hanlon will become famous soon enough
In IE you can use the insertAdjacentHTML() method, but generally you just whack a span at the end of your document and use the innerHTML property which is common to both IE and Netscape 6+.

Code:
<button onclick="appendText()">Click Me</button>
<span id="eof"></span>
</body>
</html>

<script language="Javascript">
function appendText() {
  var eof = document.getElementById("eof");
  eof.innerHTML += "<br><i>Another</i> line of content";
}
</script>
BTW, the only difference between document.write() and document.writeln() is that the latter adds a line-feed to the end of the line (for better readability).
__________________
Jon Hanlon
Jon Hanlon is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 02-04-2004, 08:52 PM
  #5
xSKATEx
Aspirant (Level 2)
 
xSKATEx's Avatar
 
Join Date: Jan 2004
Location: Detroit
Posts: 13
iTrader: (0)
xSKATEx is on a distinguished road
thx!
xSKATEx is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 07:35 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.