1

I am using WebIOPi to create a program to control GPIO on a raspberry pi. I cannot use PHP as it conflicts with WebIOPI. I am altering the webiopi.js. I have it 99% there for my needs but I have to save two settings to the server. I decided to use a txt file to do this. Is it possible to place the single number in the txt file into the variable for use in the javascript? Is it possible to write to the text file?

var noThing;
checkThingNumber = function(){

noThing = thingNumber.txt;

return noThing;
}
dc5
  • 12,341
  • 2
  • 35
  • 47
Paul
  • 11
  • 1
  • How will the Javascript read the text file? How are you executing the Javascript? Is it via a browser, or some other means of interpretation? – crush Sep 12 '13 at 16:33
  • I don't think you can access to local files with JS. But you can save your settings with HTML5 Storage feature. Here how to use IT http://www.w3schools.com/html/html5_webstorage.asp – Dayron Gallardo Sep 12 '13 at 16:38

0 Answers0