Embed a text file in an html page

belaadel Posted messages 20 Status Member -  
 fateh.laouni -
Hello,

I want to integrate a text file into a page designed in HTML; this page is static and not generated by PHP.

I specify that I know how to do this in PHP with include("file.txt").

So please only suggest solutions in HTML or JavaScript.

Thank you for your understanding.
Configuration: Windows XP Firefox 1.5.0.9

6 answers

Guaraweb
 
Hi!

I just checked the link, I tested it and apparently it works well on Firefox:

<object data="yourfile.txt" </object>

See you!

Malcolm
4
tarek_dotzero Posted messages 834 Status Member 122
 
More precisely:

<object data="yourfile.txt" />

that's enough!

otherwise you can do it with VBS:

https://vb.developpez.com/faq/vbs

good luck!
0
Fab
 
In HTML, the OBJECT tag is used to embed a text file (among others).

Here is a link that will certainly help you:
http://perso.orange.fr/bernard.quevillier/toposnew/object.htm
2
david
 
Hello, I tested this thing, it doesn't work. Can we have a concrete example please? Thank you.
2
Weedo
 
I just tested it, it works under FireFox and under IE, but under IE you probably get a message asking if you want to allow ActiveX content ^^

For example:

You create an HTML file...

<html> <object data="test.txt" height=400 width=800 /> </html> 



then you create a text file (here called test.txt)...
and your text and HTML files need to be in the same directory, otherwise you have to modify the path.


Anyway, it works, I hope it will work for you :)
0
belaadel Posted messages 20 Status Member 11
 
Hi Fab,

Thank you for the link, I visited the page and picked up some hints but I'm still not sure if I'll manage.

The solution only works on IE, but how will it be interpreted by search engines?

If you find another link, I'm all ears, thanks again.

See you later.
0
belaadel Posted messages 20 Status Member 11
 
Hello again!

I'm still unable to achieve what I want to do: "integrate a text file into a page designed in HTML".

If anyone has a new solution, explanation, example, I'm all ears.

Thank you so much!!!
0
fateh.laouni
 


<textarea class="chatCodes" style="margin: 2px; width: 770px; height: 103px;">
YOUR TEXT HERE
</textarea>

0