I use document.getElementById("val").click()to trigger a click event, but it continues to fire several times.
Here I add eventHandler:
try {
addEventHandler(oPrevArrow, "mousedown", handlePrevDayClick);
addEventHandler(oNextArrow, "mousedown", handleNextDayClick);
addEventHandler(oLogout, "mousedown", handleLogoutClick);
}
catch (err) {
}
In the click event, I perform an "automatic click"
function handleNextDayClick(e) {
e = e || window.event;
stopEvent(e);
document.getElementById("btn_nextday").click();
}
I need help to find out what makes him call several times, and a possible solution.
Note: a button that is automatically clicked invokes a method in ASP.NET Code-Behind
source
share