This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Object does not trigger a custom javascript
#3
$(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");
};
});
});

Smile We found the problem,

the script worked fine but on some browser the cache must be deleted.


Big Grin our bad, but thank you for your help.
Reply


Messages In This Thread
RE: Object does not trigger a custom javascript - by Kilogica - 07.06.2021, 15:29

Forum Jump: