JRS: In article <bp**********@news.eusc.inter.net>, seen in
news:comp.lang.javascript, DU <dr*******@hotWIPETHISmail.com> posted at
Tue, 25 Nov 2003 01:16:12 :-
All 3 of us have suggested that you use alert()'s instead of
document.write() calls. All 3 of us have suggested \n instead of a <br>
node inserted into a text string.
But AFAICS none of you made it clear that <br> is what should normally
be used within document.write (though \n & \t can be useful within
<pre>) and \n is what should be used within such as alert or writing to
a control.
Within ordinary HTML, \n has no more effect than a space.
Basically, <br> is used within HTML, and \n within script; and the
ability to write HTML with script adds confusion.
Also : While a page is loading, document.write adds to the current
position. After a page is loaded, the next document.write starts a new
page, losing the old one.
The above is at least a first approximation.
Someone wrote "I've never seen a document that modifies the document
structure as you're submitting a form; i'm not sure this is doable or
correct. I would rather use alert()'s to see these values instead." --
it is presumably doable with DynWrite (see FAQ), and ISTM quite
practicable to have a form with a static entry area on the left and a
dynamic running-commentary at the right.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.