Replies: 1 comment
-
Is that the question of how to apply PageBuilder? Or what are the requirements for HTML code to conform to the characteristics of the ESP32 WebServer class? Is the question What is the best way to do this?
I am not sure what you are trying to say in the first place. There are other HTML tags that can trigger page transitions besides the
I am not even sure what the question of this is. Do you mean that the server-side processing is tied across the client's session? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am setting up a single page to set some parameters within my ESP32.
I have taken the sample code to set some buttons and get a static method called when they are clicked. Sadly, the only way I found to pass which button has been pressed was like in the example, by using the href.
Code snippet:
{{SECAUTOBRIGHT_SET}} calls a method which evaluates abr and sets an enum parameter accordingly.
The button - SECAUTOBRIGHT_ - methods read which enum was set last and just returns the style for the button (f.e. String "button", so the style is taken from same char array as in the example). This way I can see which button was pressed last.
First question is: is this a good way to accomplish this?
And my problem: the href is then kept within the browser, f.e. when pressed button verylow, the URL reads "http://192.168.178.170/?abr=verylow".
Problem is, when refreshing the page, the button is "pressed" again. Especially when connecting from multiple devices, this is very annoying.
Is there an other way to recognize a buttonpress while staying on the same site, without "keeping" the press within the URL?
Beta Was this translation helpful? Give feedback.
All reactions