Embed a text file in an html page
belaadel
Posted messages
20
Status
Member
-
fateh.laouni -
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.
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
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
Here is a link that will certainly help you:
http://perso.orange.fr/bernard.quevillier/toposnew/object.htm
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...
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 :)
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 :)
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.
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.
<object data="yourfile.txt" />
that's enough!
otherwise you can do it with VBS:
https://vb.developpez.com/faq/vbs
good luck!