if the data file does not necessarily need to have a .txt extension, it
would be better to rename it toto.js (you can still open it in notepad)
within toto.js you'll need to assign variables for the data,
for example in the simplest way:
mydata1 = 1
mydata2 = 2
mydata3 = 3
mydata4 = 4
mydata5 = 5
then it's just a matter of including & using the variables within toto.html,
for example:
<script src="toto.js" type="text/javascript"></script>
<script Language='JavaScript'>
document.write(mydata1)
</script>
if you must have the data in a .txt extension file, it may still work:
<script src="toto.txt" type="text/javascript"></script>
<script Language='JavaScript'>
document.write(mydata1)
</script>
----------------------------------------------------------------------------
"Jean-Marie Delapierre" <je*******************@wanadoo.fr> wrote in message
news:pa****************************@wanadoo.fr...
Hi,
I have two files in a directory.
one called toto.txt with the following content :
1
2
3
4
5
one called toto.html in which I want to get the data of toto.txt with a
javascript script.
May you suggest me an example of a script doing this ?
Regards.
Jean-Marie