Jump to content

Inserting text from file into a form


jmc92

Recommended Posts

Is there a way of file browsing to a random txt file on my comp, and having its content loaded into a form on a web page?Further explaining the question....Theres a page with a large text formButton underneath says click to edit txt from fileAnd then I click, open and load the content into the form

Link to comment
Share on other sites

You can use AJAX to grab plain text from any text file on your server. No server-side scripting is required.Browsing is trickier and does require server-side action. Building a file browser from scratch is not for the faint of heart. Been there, and it was a great learning experience. There are also tools available. KFM is pretty common, and free. Google ajax file browser for others.An in-between technique would be to use just enough server-side scripting to embed a list of file URLs into your document. A user clicks on a name, and AJAX does the rest. Assuming your directory/file structure is orderly, this is not hard to do.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...