View Full Version : reading a .txt file
habib
10-04-2002, 05:26 PM
Hi ALL!
I have a text file (cities.txt) which contains hundreds of cities. Is there anyway of being able to read the file and store the text in a variable?
Thanks
HR
requestcode
10-04-2002, 05:32 PM
Not with Client Side JavaScript. It can not read files or write to them. You could try creating it as an external javascript file where you poplate the variable in it and then reference if from your document.
habib
10-04-2002, 05:43 PM
Client side is a no-no, how about server side?
requestcode
10-04-2002, 07:54 PM
You could use PHP or Perl, but I am not much help with those. Try posting this in the Server Side Forum. Someone there should be able to help. Good Luck.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.