JRS: In article <14*************************@dcsi.net>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@dcsi.net> posted at
Sun, 14 Dec 2003 15:37:10 :-
In article <jU*******************@news-lhr.blueyonder.co.uk>, iz0nlee
<iz*****@blueyonder.com> wrote:
is it possible to write text into a page or does the whole page have to be
re written using Document.Write?
I'm an absolute beginner and wanted to add lines of text when a button is
clicked. the only references i can find are to text boxes or alerts. if I
use Document.Write the page changes to hiving only the text I wrote so do I
have to rewrite the whole page into the script. Could be a long job.
You can write to an iFrame as I do on my Amtrak page.
See http:www.dcs-chico.com/~denmarks/amtrak.html
-- in body
<iframe src="initial page to display - optional" name="framename"
height="?" width="?" scrolling="auto">This text will appear if iframe
is not supported</iframe>
-- in a script
iFrameWindow=frames["framename"];
iFrameWindow.document.open();
iFrameWindow.document.write("This is the text");
iFrameWindow.document.close();
You could give better-informed answers by familiarising yourself with
the FAQ *before* answering. This one is 4.16.
OP : <URL:http://www.merlyn.demon.co.uk/js-valid.htm#VFF> provides an
example of this, if you make at least one entry wrong (e.g. blank)
before pressing an FTry button.
<URL:http://www.merlyn.demon.co.uk/js-other.htm#RWP> refers;
<URL:http://www.merlyn.demon.co.uk/js-tests.htm#DynTest> demonstrates.
--
© 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> Jsc maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/Jsc/&c, FAQ topics, links.