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
-
Hi!
I just checked the link, I tested it and apparently it works well on Firefox:
<object data="yourfile.txt" </object>
See you!
Malcolm-
More precisely:
<object data="yourfile.txt" />
that's enough!
otherwise you can do it with VBS:
https://vb.developpez.com/faq/vbs
good luck!
-
-
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 -
Hello, I tested this thing, it doesn't work. Can we have a concrete example please? Thank you.
-
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 :)
-
-
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. -
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!!! -
<textarea class="chatCodes" style="margin: 2px; width: 770px; height: 103px;">
YOUR TEXT HERE
</textarea>