Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading a text file into a form textarea

Status
Not open for further replies.

p3aul

Instructor
Jul 17, 2004
16
US

loading a text file into a form textarea.
How do I do this?
Thanks,
Paul

The Bad News: Time Flies
The Good News: You are the Pilot
 
Where does the text file reside? On the client side or server side? If it's on the server, you'd load it with server-side scripting, like ASP, ColdFusion, PHP, Java Server Pages, or whatever is available. On the client side, you'll have to use IE and the FileSystemObject.

Lee
 
Well, It looks to me that if JS can load an image residing on the server, then it could load a textfile?
Paul


The Bad News: Time Flies
The Good News: You are the Pilot
 
Non sequitur.

Your best choice is to use server-side scripting to read the text file and insert it into the textarea. If you insist on using client-side scripting, you could use AJAX and accomplish this, and as long your viewers all have Javascript enabled it will work.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top