Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: HTML input

  1. #1
    New to the CF scene
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML input

    i need to read in text from a text file and input it to my current webpage.
    i can't seem to come up with the code for it and any help would be greatly appreciated. thanks.

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    On the server or on the client's machine?
    Helping to build a bigger box. - Adam Matthews

  • #3
    Regular Coder
    Join Date
    May 2005
    Posts
    220
    Thanks
    1
    Thanked 2 Times in 2 Posts
    When you opened your text file did you be sure to save it with the extension as .html?

  • #4
    New to the CF scene
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Basscyst
    On the server or on the client's machine?
    the file is on the server.

  • #5
    Regular Coder
    Join Date
    Jan 2005
    Location
    Essex
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dunno then.
    Danny Hayes
    Under Construction www.hayes-design.co.uk

  • #6
    New to the CF scene
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vapor
    When you opened your text file did you be sure to save it with the extension as .html?
    i can't save it as any other. i have a program that outputs the name of the song that is currently playing into a text file. i need to read that text file into my webpage for all to see what i am listening to.

  • #7
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Load the text file into a hidden <iframe>. Then you can read the value out of the <iframe>. If only the name of a single song is in the file, you could even just make the frame visible and just have it display the text straight.

    ex.
    Code:
    <iframe src="myfile.txt" style="display:none;"></iframe>
    Make sense?

    Basscyst
    Last edited by Basscyst; 05-27-2005 at 11:11 PM.
    Helping to build a bigger box. - Adam Matthews


  •  

    Posting Permissions

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