PDA

View Full Version : getting data from txt.file to webpage


localZero
09-12-2003, 08:02 AM
What is the easiest way to read data from a (ie .txt)file, You know... I mean if i need to put up loads of text on my site plus it should be easy as abc to update.

liorean
09-12-2003, 09:25 AM
Well, easiest would be using SSI or the PHP/ASP equivalents. Ask about that in the serverside forums. If you on the other hand wants clientside stuff, it gets trickier.

Kor
09-12-2003, 09:41 AM
You say, liorean (hej dar ):cool: , that a client-side solution is trickier, then possible? How's that?... I used to think that a client-side language can not read/write third part files...

liorean
09-12-2003, 09:53 AM
Well, given the file is in the same domain as the caller document, you can use ActiveXObject in iew (XMLHTTP or DOMDocument) and XMLHttpRequest or document.load in moz. You can also use nn4's LiveConnect to interface with Java doing the equivalent. Op, iem and saf/konq can't do it for the moment. If you want a closer look on the technologies I mentioned, see the links in this thread <http://codingforums.com/showthread.php?s=&threadid=22591#post113492> and in this thread <http://codingforums.com/showthread.php?s=&threadid=25698>

Kor
09-12-2003, 10:13 AM
aha... that's right, i forgot about XML... One more question, please: All these suppose a special configuration for web server? Or it will works on a usual configuration...?

liorean
09-12-2003, 10:17 AM
Actually, just the DOMDocument and document.load requires the data to be xml. XMLHTTP and XMLHttpRequest can both take any files (but if your file containt markup but isn't xml you must override the content type setting to avoid crashing moz)

sage45
09-12-2003, 04:46 PM
Why, oh' why, does noone ever mention VBScript??? :p

-sage-

liorean
09-13-2003, 03:15 AM
Bacause it's ie proprietary, made by microsoft, and thus must be evil?