Form for "control LEDs over the 'net" example

Hi, I’m a newbie working through the Electron examples. They are fantastic.

Right now I’m on the “control LEDs over the 'net” example. Works great!

The html form that pushes the LED on/off works perfectly.

Then the doc says, “You’ll get some info back after you submit the page that gives the status of your device and lets you know that it was indeed able to post to the URL. If you want to go back, just click “back” on your browser.”

Is there a way to get that response in another html form?

I’d also like to do that with some of the other API examples, for example the “read the sensor” example.

If I send the info in an html form, it would be cools to get it back in an html form.

Any advice?

Thank you for a great product, and super documentation.


Give this tutorial a try :smile:

This looks really promising. Thanks!

Still trying to figure out how to display the results from a API push and get inside a web page. I guess it’s AJAX related, but any help appreciated.

Hi @dcdenison

If by API push you mean a publish event, then there are tutorials for that too:

1 Like