PDA

View Full Version : Read and modify text from file


Lazaroth
05-06-2003, 05:47 PM
How do you read the text from a file in a javascript and then make it put a <br> after every "."?

I.e.

<script>

var thetext = the_text_from_the_file.txt

// add a <br> after every "." in the file

//and then

document.write(thetext);

</script>

beetle
05-06-2003, 05:53 PM
Inserting a <br> after every period is easy -- reading a text files is something you cannot do w/o ActiveX -- and even then it will only read from the client machine.

If this is for the web -- you'll need something besides javascript.