In the detail, if I click on "Update" button, the request respond with a success (I show the notification in the "seccess" statement) but the timer is not updated.
Do you have any idea?
Thanks.
My code:
Code: Select all
$.ajax({
url: urlcmd,
async: false,
dataType: 'json',
username: $.domoticzUser,
password: $.domoticzPassword,
beforeSend: function(jqXHR, settings) {
console.log('1. urlcmd: '+settings.url);
},
error: function () {
if ($.enableNoty == true){
new Noty({
text: 'Errore durante l\'aggiornamento.',
type: 'error',
theme: 'bootstrap-v4',
timeout: $.timeNoty
}).show();
}
},
success: function(){
if ($.enableNoty == true){
new Noty({
text: 'Aggiornamento eseguito correttamente.',
type: 'success',
theme: 'bootstrap-v4',
timeout: $.timeNoty
}).show();
}
}
}