Hi again.
I see many apps that use multiple web pages to collect information, then the information is stored or transmitted after. Examples include menus on a delivery restaurant or an inventory system. My central heating controller is basically a thermometer and clock that transmits on/off instructions , bus the setup involves multiple screen pages
Is there any possibility of getting a tutorial or even extension book sith this in mind?
Many thanks
Ian
Hi Ian.
Do you mean creating a web server that provides multiple web pages? For example, one page shows configurations and other page shows sensor readings?
Regards,
Sara
Hi Sara
Yes, the application that I want to build needs a ‘front page menu’ with each choice on that menu going to a new page which has a a number of buttons, or input boxes, or even just text boxes.
I can imagine that the many readers of your tutorials may start with just a couple of home automation devices but could easily end up with too many to fit on one page.
An expandable framework would be wonderful.
Ian
Hi.
I understand what you want to do.
We’ll include a project on how to add multiple pages to your web server in the “Build Web Servers” eBook in the next release. I’m not sure when the next release will be. Probably end of January or February.
Basically you need multiple HTML files. One for each page. Imagine you have the main page (main.html) and a page for controls (controls.html).
You need to add links to your homepage that redirect to other pages, like clickable buttons or clickable text.
Those links should redirect to another page whose .html file should be saved on the ESP32 too.
For example, in your homepage, add a button that when clicked redirects to /controls
In the ESP32 server side, add lines that will serve the controls.html file:
server.on("/controls", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SPIFFS, "/controls.html", "text/html",false); });
This was just a quick explanation. I hope it is clear.
Let me know if you need further help.
Regards,
Sara
Yes, thank you Sara. I shall look forward to the new upgrade.
I am retired and very old, I have programmed for years (since 1968) but have never touched HTML. The modern versions that seem to build layer over layer – bootstrap over java over css over html are too much for me! I will just stick to assembler – it is so much simpler!
Thank you, and I hope you both have a happy and safe Christmas.
Ian
Hi again.
You’ll be notified via email when the new edition of the eBook comes out.
I understand. It can be difficult to adapt to new things. Specially when it comes to programming.
Thank you.
Have a happy Christmas too.
Let me know if you need further help in the future.
Regards,
Sara