A page includes buttons that have state. When the page loads, how to query the database during the onLoad event so the actual button state is reflected in the button as drawn?
I expected this to work:
window.addEventListener("DOMContentLoaded", ready);
function ready(event) {
document.getElementById(THE_BUTTON).click();
}
Any suggestions welcome.
Ron