$(function(){
grp.listen('32/5/98', function(object, state) {
var value = object.value;
console.log("dopo listen");
if (value == 1) {
console.log("evento1");
const body = document.body;
body.click();
if (!localStorage.getItem("reload")) {
localStorage.setItem("reload", "true");
location.reload();
}
} else if (value == 0) {
console.log("evento2");
localStorage.removeItem("reload");
} else {
localStorage.removeItem("reload");
console.log("niente");
};
});
});
We found the problem,
the script worked fine but on some browser the cache must be deleted.
our bad, but thank you for your help.
grp.listen('32/5/98', function(object, state) {
var value = object.value;
console.log("dopo listen");
if (value == 1) {
console.log("evento1");
const body = document.body;
body.click();
if (!localStorage.getItem("reload")) {
localStorage.setItem("reload", "true");
location.reload();
}
} else if (value == 0) {
console.log("evento2");
localStorage.removeItem("reload");
} else {
localStorage.removeItem("reload");
console.log("niente");
};
});
});
We found the problem,
the script worked fine but on some browser the cache must be deleted.
our bad, but thank you for your help.