thank you! wil play with it some more!
Posts made by cor
-
RE: Http sender 3th party
Dear Phil and Mark,
Dont know if you're still folowing this, trying to use your solution, and in the process maybe skipping a step, but i dont know yava script.I am using solution 2, the point i am referencing has state 1 or 2., trying to ad an extra variable. This is wat i got; is this a posibylity?
var pointinfo = /(1|2)/.exec(p20.value);
var info = "off"
if (pointinfo = 1)
var info = "on"
if (pointinfo = 2)
{
var headers = {"Host":"192.168.178.12:8080"};
var parameters = {
"type":"command",
"param":"switchlight",
"idx":"7",
"switchcmd": info
};
HttpBuilder.get("http://192.168.178.12:8080/json.htm", headers, parameters).resp(function(statusCode, headers, content) {
// handle the response, maybe return "Success!" or whatever
}).err(function(statusCode, headers, content) {
// handle error responses
}).execute();Hope to hear from you