Dear friends ,
I tried to write in html page from text file using
"
<html>
<head>
<script type="text/javascript" language="javascript">
function Read()
{
var Scr = new ActiveXObject("Scripting.FileSystemObject");
var CTF = Scr .OpenTextFile("C:\\123.txt", 1, true);
data = CTF .ReadAll();
document.write(data);
alert(data);
CTF .Close();
}
</script>
</head>
<body onLoad="Read()">
</body>
</html>
"
But the contains of text file getting changed , like if there is
"My name is Karimkhan
I love India "
Then it will write like "My name is Karimkhan i love India"
It ignores multiple spaces and new line character , so what should I do to prevent this...IS THERE ANYTHING LIKE <PRE> TAG IN HTML "?


