Using AJAX to write to PHP - then parse PHP
pthartmann
Posts: 27
Using Javascript, specifically jQuery and AJAX commands, I would like to write to a PHP file stored on the SD card.
Then, if possible, I would like to parse the PHP file in order to have discrete control within the Propeller.
Last but not least, I would like to also send data(in real time) from the Propeller to the Webpage - I'm not sure if the aforementioned process could work in reverse --> Propeller writes to PHP and then refreshed on the Webpage.
Approaches I would like to stay away from are, IFRAME and traditional GET/POST/REFRESH techniques that reload the entire Webpage.
My latest inspiration comes from this website: LINK
I suppose achieving this would provide anyone the means to send real-time-data to and from the µC and Webpage in an efficient manor. Furthermore this would provide the basis for a quality control system for any automated system. -I have attached initial code. This code has buttons using javascript and other elements from contributors here on the forum.
Then, if possible, I would like to parse the PHP file in order to have discrete control within the Propeller.
Last but not least, I would like to also send data(in real time) from the Propeller to the Webpage - I'm not sure if the aforementioned process could work in reverse --> Propeller writes to PHP and then refreshed on the Webpage.
Approaches I would like to stay away from are, IFRAME and traditional GET/POST/REFRESH techniques that reload the entire Webpage.
My latest inspiration comes from this website: LINK
I suppose achieving this would provide anyone the means to send real-time-data to and from the µC and Webpage in an efficient manor. Furthermore this would provide the basis for a quality control system for any automated system. -I have attached initial code. This code has buttons using javascript and other elements from contributors here on the forum.
spin
12K
Comments
I am working with the following code:
http://www.c-point.com/javascript_tutorial/Editor/ajax_tutorial.htm
http://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm
http://www.webdeveloper.com/forum/showthread.php?t=169337
and for writing SPIN code to access the SD card I am referencing the following:
http://gadgetgangster.com/tutorials/331
I'll still have to parse the .txt and I'm also having trouble with actually pointing to the .txt, though that should be an easier task.