In the code below each I have two forms one to send the value 1 and another to send 0 and both forms send this value via GET
When I send the GET PUMP STATUS # 1 ::="motor": receives the PLC return
STATUS PUMP # 1 :: = true
STATUS PUMP # 1 :: = false
Call
/index2.html? "motor" = 1
Disconnect
/index2.html? "motor" = 0
How do I make a single button send via GET and change the button text to On and Off?
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Liga Desliga</title>
</head>
<body>
<form>
<p>
<input type="submit" value="LIGA">
<input type="hidden" name='"motor"' value ="1">
</p>
</form>
<form>
<p>
<input type="submit" value="DESLIGA">
<input type="hidden" name='"motor"' value ="0">
</p>
</form>
STATUS BOMBA N°1::="motor":
</body>
</html>