Hello everyone,
i have some buttons on my page which i want label dynamically depending on a token the user picks from a dropdown menu.
The corresponding labels are saved in a lookup file which i access through javascript. Upon clicking on the buttons a search should be started to write in a kv store.
To this point, everything works just fine.
As soon as i change the token from the dropdown menu, the buttons stop working until i refresh the whole page.
Everything in my js file but the button clicking is still working after the changing of the token.
Here is the code for the buttons I'm using (i also tried "document.getElementById("quickChange0").addEventListener("click"..." but that did not solve the problem) :
$('#quickChange0').click(function () {
var selected = tokens.get("selected");
var doQuickChange1 = "really long search";
console.log(doQuickChange1);
service.search(doQuickChange1);
setTimeout(function(){location.reload()},1000);
});
Does anyone know why this is or has an idea how to do this in a different way?
Thanks in advance!
... View more