NetBurner: Embedded “Dynamic” HTML
This next experiment is a little more interesting. I wanted to the ability to call a function from HTML, and return text information to the html server. The vendor had a nice simple example of this on their web site, where a counter of “hits” to the html page is displayed in the html, and updated. I used this example, and added it to my html page that I used in the prior experiment.
This experiment uses a call to a C/C++ function embedded in the html. The function called generates a number, and provides a text representation of that number to a special function which brings the text to the server. Check this link to the example: How do I create a dynamic web page?
I did the “make htmldata.cpp” in order to generate htmldata.cpp, all went well. Next I did the “make” and the new application was ready to download.
The system was as I left it: the serial interface on the NetBurner card to COM1 on my PC. All as the diagram shows.
At this point the download from PC to NetBurner card was routine. The application worked too. Each time I reloaded the html page, the counter was increased by 1.
At this point I am going on to bigger things. Shortly I may put the NetBurner card on a public IP address and have all these samples running when I am not doing testing. I’ll let you know when I do that.