Button click.....


Trying to make my scheduleUpdate fire when the button is pushed but when I try to move it …the modules won’t load…

Suggestions? Here is what I have right now… I thought I could just put my this.scheduleUpdate(); right before the addEventListener like this:

button.addEventListener("click", () =>   scheduleUpdate(this),  showFMI(this)); //Show description on click

But when I do that the module won’t load :frowning:

var button = document.createElement("button");
            button.innerHTML = "Find my device";
            var title = document.createElement("div");
			button.className = "button";
			button.addEventListener("click", () =>  showFMI(this)); //Show description on click

			//below is the function to show description and hide title
			function showFMI(FMI) {
				thisFMI.intpause();	//clear interval
				var readTimer = setTimeout(function() {hideFMI()}, thisFMI.config.readInterval); //sets timeout for the info
				description = document.createElement("div");
				description.className = "info";
				description.innerHTML = "Your phone is here: "+fmi.Location + " and now I'm Beeping your device[s]";
				description.addEventListener("click", () => hideFMI(thisFMI));  //Hide description on click
				description.addEventListener("click", () => clearTimeout(readTimer));