Webpage Content Question
th3jester
Posts: 81
I am still waiting for the Spinnernet but I have been going through the example code in the OBEX. Simple question:
Will the quotations in the below code cause an error? The HTML, <META HTTP-EQUIV="REFRESH" CONTENT="5">, is a simple automatic refresh but with the Propeller Tool it changes the color which makes be think it won't work properly.
StringSend(0, string("<META HTTP-EQUIV="REFRESH" CONTENT="5">", PST#NL))
I'll be able to test it once I get the Spinnernet, I'm just seeing if anyone knows off the top of their head.
A little harder question:
Do you think the Spinnernet will be able to perform Comet/Ajax/HTTP-Streaming? This would be helpful for not having to constantly update the whole page, the specific data would be real-time (lets say from a sensor). I'm not expecting someone to program it out or figure it out, I'm just curious if anyone thinks this is reasonable.
Thank You.
Will the quotations in the below code cause an error? The HTML, <META HTTP-EQUIV="REFRESH" CONTENT="5">, is a simple automatic refresh but with the Propeller Tool it changes the color which makes be think it won't work properly.
StringSend(0, string("<META HTTP-EQUIV="REFRESH" CONTENT="5">", PST#NL))
I'll be able to test it once I get the Spinnernet, I'm just seeing if anyone knows off the top of their head.
A little harder question:
Do you think the Spinnernet will be able to perform Comet/Ajax/HTTP-Streaming? This would be helpful for not having to constantly update the whole page, the specific data would be real-time (lets say from a sensor). I'm not expecting someone to program it out or figure it out, I'm just curious if anyone thinks this is reasonable.
Thank You.
Comments
The quotation marks will end the string early. The quickest workaround would be to do this: The hex value for the quotation mark is 22, so the above example will include value for the quotation mark instead of the mark itself. A better way to do it is this: This will include the Index.html file, followed by a null, in the DAT section. Using @WebPage will pass the address to StringSend.
David Carrier
Parallax Inc.
Yes, AJAX streaming sensor reading is doable. Here is an AJAX proof of concept using Timothy's modified TCP Server demo. The demo is very basic, but illustrates asynchronous get requests from the XmlHttpRequest object on the browser client to an XML serving process on the Spinneret.
Google YouTube video of the Spinneret, Chrome browser, PST and use of the mouse-over and start/stop timer buttons for the AJAX POC
http://www.youtube.com/watch?v=sNTTufau7ws
Note: Use of the XmlHttpRequest object is heavily browser dependent, Google and IE8 are normally fine running the demo. The video was done on Google Chrome.
Dynamic Application Server main thread contains the modified source
http://forums.parallax.com/showthread.php?p=955667#post955667
thank you
/michael