If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

form that displays a .txt file

Hi, I am an italian boy, so I apologize for my english.

I have this problem:
I want to do a html page with a form that display some text that is in a file .txt.
So when I want to change the text displaied in the form, I can change the test in the file .txt.

It is possible to make this in javascript or I have to ask to another forum or another application?
(I wouldn't use a asp page)

You can do this with AJAX. Here's how you could do it using the jQuery library, for example:

Code:

// when the page is ready
$(document).ready(function(){
// fetch the text file
$.get("myTextFile.txt", function(data){
// when the text file is loaded, put its content into an element on the page.
$('#myFormElement').text(data);
});
});