I have a button that is hidden on a form. The form is for sign supports. If there is more than related sign, my button should display, but it is not.
Here is an excerpt of the code-
HTML:
<button id="btnRelatedSigns" type="button" style="visibility:hidden">Signs</button>
JavaScript:
// display number of related records in console
queryTask.executeForCount(query, function (count) {
console.log(count);
if (count >= 1) {
document.getElementById("btnRelatedSigns").style.visiblity = "visible";
} else {
document.getElementById("btnRelatedSigns").style.visiblity = "hidden";
}
})
The code counts the related signs just fine, but does not display the button as visible.
Here is my project on github with the version related to this question: csergent45/streetSigns at e8bd20b75864c14e4df56589e4f9baa03db5c053 · GitHub