You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am struggling to get my head round the link between the post in the server.on and its link to the html. I want to add a constantly updating number to the to left of the web page so not as part of the form.
So the server.on would send the number to say /num but how does that get onto the web page where I specify? An example would be really helpful
Thanks Tony
The text was updated successfully, but these errors were encountered:
The web page is just served as-is by the ESP8266 web server library. It's not changed directly by the ESP8266. The page contains JavaScript code that is executed on the client side (your PC, phone, etc). It makes requests to the ESP8266, which are handled by the server.on calls.
If you want something on the web page to constantly update with a value from the ESP8266, you'll need to add a server.on call to the Arduino sketch, and js code to request the value. Look into js timers to do something repeatedly at a regular interval.
You could also look into the use of web sockets to push data directly from the ESP8266 to the page at a regular interval, or just when the value changes. The v1.1 branch uses web sockets to push updates to all connected clients, to keep them in sync.
Hi, I am struggling to get my head round the link between the post in the server.on and its link to the html. I want to add a constantly updating number to the to left of the web page so not as part of the form.
So the server.on would send the number to say /num but how does that get onto the web page where I specify? An example would be really helpful
Thanks Tony
The text was updated successfully, but these errors were encountered: