Log in

View Full Version : link to .txt file



Benneke
07-25-2007, 02:32 PM
Hi,

I'm already busy for a long time with searching for a right solution for easy change text on a site.
What I want is a little box on a page, where text appear in via a link to a .txt-file. In fact I have found the solution:

<iframe name="cwindow" style="border width=150 height=150 src="doc.txt"></iframe>

Now I have one problem. Of course the text appear in a normal txt-font-face. I want to change the properties of the lay-out. Of course the solution is referring to a .HTM-file, and make an html-file with the text. But then I am as far as before.

What I want is making a page in a layout. On this page have to be a table with text. And the text changes by changing the .txt files. In this case, you don't have to program all the time. You only can change the text in the .txt-file.

Is this possible?

Sliight
07-25-2007, 05:22 PM
I dunno if this would help, but here is what I use on every page I have, I use it to input the text for my navigation, this way I don't have to change it on 70+ pages.

<div class="right_box">
<div class="right_top"><div></div></div>

<div id="tr"><span>Testimonials</span>
</div>

<div id="testimonials">

<ul id="testimonials_list">

<!--#include file="testimonials.txt" -->
<li><span> </span></li>

</ul>

</div>

The <!--#include file=".txt" --> from what I've been told places the HTML you want right from the text file. So possibly, instead of grabbing the doc.txt inside the iframe, you could place the everything you want within the .txt file itself.

They may do exactly what you are already doing, and I may not have enough experience to understand if you're trying to do something I don't get. Either way, it's more of an idea of what might help?

If this doesn't do anything... someone who really knows what they are doing here will probably be able to help :)

Twey
07-25-2007, 05:30 PM
That (a server-side include of some description) is indeed what is required, but it will only work on an SSI-enabled server. All server-side languages have their equivalents to <!--#include-->; the task is working out which ones you can use.
What I want is making a page in a layout. On this page have to be a table with text. And the text changes by changing the .txt files. In this case, you don't have to program all the time. You only can change the text in the .txt-file.HTML is not programming. It is a document markup language.

jscheuer1
07-25-2007, 05:46 PM
HTML is not programming. It is a document markup language.

To most folks and in generic terms, it is a language used to program what the browser does. So, the distinction is hazy at best.

What is wanted here is a way to get a text file auotomagically presented as formated HTML code, without having to re-code it as HTML each time it changes. I think that no matter how one does this, some token or tokens within the text file would be required to tell the intermediary language used where to put the HTML tags. If things are not too complex, a standard header and footer boiler plate could be used and the line breaks in the text file could serve as tokens.