Results 1 to 4 of 4

Thread: link to .txt file

  1. #1
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default link to .txt file

    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:
    Code:
    <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?

  2. #2
    Join Date
    Jul 2007
    Location
    California
    Posts
    177
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    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

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •