On an ESP32, I have developed a wireless web server from scratch using micropython. Please correct me if I'm wrong, but I think using libraries like Flask and JQuery is not possible.
I've had lots of trouble running out of memory composing HTML pages. Currently, keeping an HTML page under 10k bytes avoids trouble. I use javascript as much as possible to reduce the HTML size and improve response time.
I need a dialog that has about 6 buttons. Each button posts a message to the server instructing a simple action.
I would like to do something like the following, which does not work.
dialog = document.createElement('dialog');
document.appendChild(dialog);
closeButton = document.createElement("button");
closeButton.innerHtml = "Close";
closeButton.onclick = function() {
// figure out how to close this dialog
}
dialog.appendChild(closeButton);
dialog.showModal();
Any advice or a pointer to a useful tutorial will be greatly appreciated.