j00w00t
05-27-2005, 05:14 PM
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.
Basscyst
05-27-2005, 09:29 PM
On the server or on the client's machine?
Vapor
05-27-2005, 09:31 PM
When you opened your text file did you be sure to save it with the extension as .html?
j00w00t
05-27-2005, 09:55 PM
On the server or on the client's machine?
the file is on the server.
j00w00t
05-27-2005, 09:57 PM
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.
Basscyst
05-27-2005, 10:08 PM
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.
<iframe src="myfile.txt" style="display:none;"></iframe>
Make sense?
Basscyst