I would like to know if there is possible to run a html file from the SD card, but this html file read/write a csv file.
Run HTML file from the SD card
#1
Posted 25 April 2013 - 08:40 PM
#2
Posted 26 April 2013 - 01:18 PM
#3
Posted 26 April 2013 - 05:18 PM
Well, I can run the html file using webwerver, but my html file has call to write/read to a csv file in the SD card, then the html file is not able to read/write to the csv file. My intention is to run the html as it is from the SD card, but looks like it is not possible.
#4
Posted 26 April 2013 - 06:04 PM
It is absolutely possible. I currently do this on a Netduino Plus 2. I am running NeonMika Web Server on the Netduino. When I go to http://192.169.1.12/settings.html this serves an HTML file from my SD Card. When I save my settings after filling in the form it uses jquery and json to send the data from my browser to the Netduino and the code on the Netduino saves my settings to a file called Settings.cfg on the SD Card.
- Verdris likes this
#5
Posted 26 April 2013 - 07:11 PM
It is absolutely possible. I currently do this on a Netduino Plus 2. I am running NeonMika Web Server on the Netduino. When I go to http://192.169.1.12/settings.html this serves an HTML file from my SD Card. When I save my settings after filling in the form it uses jquery and json to send the data from my browser to the Netduino and the code on the Netduino saves my settings to a file called Settings.cfg on the SD Card.
My mind is blown. Had no idea this was possible. Can you share a bit of your main code that calls Settings.cfg?
#6
Posted 26 April 2013 - 10:47 PM
Check out this project. This is where I learned from http://diybrewerytem...r.codeplex.com/
- ziggurat29 likes this
#7
Posted 06 May 2013 - 07:08 PM
Hi Dave, yes, I can see the html file in the SD card runs, but my question was related if the html file itself could open/write on a csv file (it is located in the SD card also), but according with the link looks like the netduino opens the text file then it pass the values to the browser.
#8
Posted 06 May 2013 - 07:31 PM
my question was ... if the html file itself could open/write on a csv file
I don't understand what you mean with that statement. A pure HTML file can never manipulate a file, because HTML is not a programming language. HTML may contain JavaScript code, but there is no JavaScript interpreter on a Netduino. So as Dave said, you need to write a server method in C# (or Visual Basic) that opens or creates a file and does the processing for whatever you want to do for reading/writing CSV values.
#9
Posted 06 May 2013 - 07:52 PM
Hi Dave, yes, I can see the html file in the SD card runs, but my question was related if the html file itself could open/write on a csv file (it is located in the SD card also), but according with the link looks like the netduino opens the text file then it pass the values to the browser.
Ok didn't understand the question. I don't want to be rude, but I like to keep the topics here specifically to the Netduino (just my preference). Since this board is about Netduinos and not Web programming I'm going to suggest that you find a board about web programming or perhaps take some basic HTML/Web courses on YouTube. There are lots of great courses on basic ASP.NET as well as HTML, jQuery and Server Side C# with HTML/JavaScript. A better understanding of basic client/server web interaction would certainly help you.
#10
Posted 17 May 2013 - 03:14 PM
Thanks Dave and Cuno for your recommendations.
I just got further with HTML/JavaScript and now I am able to have the web page running. But I have a problem, it runs well when I am debugging from C#, but when I leave it running the netduino+ itself the web page doesn't show the complete data as running from the debug.
Any recommendation?, other observation, the page run well (debug mode) on google chrome but in IE doesn't run well.
#11
Posted 17 May 2013 - 06:48 PM
It sounds like there may be a rendering or timing issue there. I recommend "view source" in Internet Explorer to make sure that it got the whole web page...and then you can work backwards from there. Wireshark can show you if data made it to/from the Netduino Plus 2, etc. ChrisAny recommendation?, other observation, the page run well (debug mode) on google chrome but in IE doesn't run well.
#12
Posted 24 May 2013 - 02:27 AM
Thanks for your support, I make it works.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users