PDA

View Full Version : load dynamically from a TXT file.


bsxiong
12-09-2008, 04:44 PM
is there a way for me to use javascript to dynamically update the content of a txt file onto the page?

for example:
i have ' dataBase.txt'. Within dataBase.txt, i have a value 50. I'm writing a "write to file" from a PHP file that puts a values in dataBase.txt whenever i want.


I want to have a page with a text box that the user will see it change accordinginly to the value within dataBase.txt. So when the value changed to 20, then the textbox should be 20....etc.... without having to refresh the page or press any button at all. it just change automatically.

any possible way?

rangana
12-09-2008, 09:58 PM
You need to do this with AJAX.

mas_lerdanch
12-11-2008, 07:38 AM
how to ajax from a txt file here (http://www.dynamicdrive.com/dynamicindex2/ajaxticker.htm)

i use it now

murrayd77
12-12-2008, 10:24 AM
Yes, Javascript support and that can be done with AJAX. You can easily fetch the data you need from a text file.

-- Dave.