I have the below JavaScript which works fine in Internet Explorer(IE)
function disableDiv() {
disablebutton(document.getElementById("pageWidth"))
}
function disablebutton(el) {
try {
el.disabled = el.disabled ? false : true;
}
catch (E) {
}
}
and I'm calling this within a JavaScript function
function updatediv() {
if (document.getElementById("sbtotals") != null) {
document.getElementById("sbtotals").style.display = "none";
}
disableDiv();
}
in IE el.disable
works fine but not in Chrome or Firefox.
What should I do to this to work in all 3 browsers?