Good day ,
Can’t figure out the part with the callback
webix.ajax().post("/log", params).then(function (data) {
//this part
alert(data.json().status);
}
How should ‘data’ get the server response message. It just shows me that ‘json()’ property is undefined or null.
How i tried to do it :
I get values from Form , add an extra parameter then send it to the server . There check if the value match the value in databank and send a message if they match or not. ( Using NodeJS )
if ($$("login").validate()) {
var params = $$("login").getValues();
params.exparam = "login"; /* extra Parameter */
webix.ajax().post("/log", params).then(function (data) {
alert(data.json().status);
}).fail(function (err) {
alert(err);
});
}
}
Sorry , being still a beginner.