View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#124
Well, it's a button made from a rectangle, when the button is pressed it turns a light on. When the light is on, the button should be green, when the light is turned off, the button should be yellow.

Sounds like you do understand my question, but how do I check the result of the network call?

In the code, there is console.log(), this outputs the xhttp.responseText, for example, the response looks like this;

Code:
mainLights1 "{"POWER":"ON"}"
Can I somehow use this output to change color of my button?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post: