J
Jean-Marie Delapierre
To get data from a text file in an HTML page, using javascript, you sould
wrtie such code ("\" represents a "line continue") :
<head>
<script>
function loadtext () {
var text = document.getElementsByTagName ("object")[0]\
.contentDocument.body.firstChild.firstChild.data;
}
</script>
</head>
<body onload="loadtext ')">
<object data="text_file.txt" height="0" width="0"></object>
</body>
The string variable "text" contains the text of the text_file.txt file.
Then you can split this string to get the individual data.
Regards.
Jean-Marie
wrtie such code ("\" represents a "line continue") :
<head>
<script>
function loadtext () {
var text = document.getElementsByTagName ("object")[0]\
.contentDocument.body.firstChild.firstChild.data;
}
</script>
</head>
<body onload="loadtext ')">
<object data="text_file.txt" height="0" width="0"></object>
</body>
The string variable "text" contains the text of the text_file.txt file.
Then you can split this string to get the individual data.
Regards.
Jean-Marie