The key TEST is ok. But the radio button are not working. I never see on the serial monitor RED ON or RED OFF.
What is wrong ?
key = -1;
if (req.indexOf("/key1") != -1)
key = 1;
if (req.indexOf("/RED_OFF") != -1)
{
RED_State = false;
Serial.println("RED OFF");
}
else if (req.indexOf("/RED_ON") != -1)
{
RED_State = true;
Serial.println("RED ON");
}
if (key == 1)
{
Serial.println("key1");
}
client.println("<br>"); //aller a la ligne
client.println("<button onClick=location.href='./key1\'>");
client.println("TEST");
client.println("</button>");
client.println("<fieldset>"); //dessine un cadre
client.println("<Radio button test</legend>");
if (RED_State)
{
client.println("<form action='led'><input type=\"radio\" name=\"RedLEDState\" value=\"RED_ON\" checked=\"checked\"> ON"
"<input type=\"radio\" name=\"RedLEDState\" value=\"RED_OFF\"> OFF<br>");
}
else
{
client.println("<input type=\"radio\" name=\"RedLEDState\" value=\"RED_ON\"> ON"
"<input type=\"radio\" name=\"RedLEDState\" value=\"RED_OFF\" checked=\"checked\"> OFF<br>");
}
Thanks