Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: AW: Open Read File


Message #1 by =?iso-8859-1?Q?Hans_J=F6rg_Friedrich?= <hans.friedrich@b...> on Mon, 19 Feb 2001 14:03:18 +0100
Hey Luke,

Try to read single line from the text file and add a new line symbol to
your string:

var yourText=3D "the first line of your Text" + "\n";
yourText+=3D"the second line of your Text" +"\n";


Hans


-----Urspr=FCngliche Nachricht-----
Von: Luke Chapman [mailto:luke@p...]
Gesendet: Montag, 19. Februar 2001 13:01
An: javascript
Betreff: [javascript] Open Read File


Hi,
Can you point me in the right direction,
I want to open a text file, read in a block of text, assign this to a
variable and then document.write this in a .html page.
The problem is trying to get the text into a variable. If I just assign
it
(var text=3D"....";) when the text comes to the end of the first line I
just
get "unterminated string". How do I go about this?
Thanks in advance,
Luke


  Return to Index