document.getElementById("ctrl").disabled = true;
this works in IE but does not works in mozila. What shoul I do?
document.getElementById("ctrl").disabled = true;
this works in IE but does not works in mozila. What shoul I do?
Did you try:
document.getElementById("ctrl").setAttribute('disabled', true);
It is hard to tell what the issue is that you are having. Does Mozilla do anything when the code is executed; does it display an error? What version of IE did you test it with? And can you also provide the HTML for the "ctrl" element?
One of the issue with IE and the getElementById method is that in some versions of the browser it will match on the ID attribute of a tag as well as the name attribute (which does not follow the JavaScript spec). In Mozilla it is only matching using the ID attribute.