Hi,
I have an application using native ESP-IDF for ESP32 that serves a web page.
A pull down list allows users to select either a SINGLE sensor option or DUAL sensor option.
Below the pull down is a number element for Sensor1 and Sensor2.
What I want to do is if user selects SINGLE sensor then Sensor 2 input is disable. If they then say select DUAL sensor then both sensor1 and sensor2 input elements are enabled.
I can enable and disable from javascript but not sure how to trigger my function. I thought also there may be html code that can control another element dependant on its state.
Thanks for any help.
Hi.
You can make an HTTP request using javascript that will send a request to the ESP32.
Unfortunately, I don’t program using ESP-IDF so I’m not sure how to handle the request on the ESP32 side. But if you know how to handle the request, then you can call the function you want to activate and deactivate the sensors.
Regards,
Sara