Ajax to set a variable
Ajax to set a variable
Hi i am using the following ajax call to try and set a value of a variable, then display this in a alert. When the alert comes up all it says is [object] [Object].
I have successfully used a different function in the tenHsServer.aspx. This is the first time i have tried to retrieve a value, am I right in thinking I can set a value to a variable like this??
var StatusCheck = $.ajax({
type: 'GET',
url: "http://192.168.0.34:81/tenHsServer/tenHsServer.aspx",
data: {
t: "ab",
f: "DeviceStatus" ,
d:"C5"
},
error: function (request, status, error) {
alert(request.responseText);
}
});
alert (StatusCheck)
thanks for any help