I am trying to disable a control on a page using javascript.. I am doing the following but not able to do it successfully.. anything I am missing, please point out..
if (some condition) {
var textBoxTemp = document.getElementById('_ctl21_m_txtTemp');
textBoxTemp.disabled = true;
}
I got the element id by looking at the source of the page. In the source the id shows
_ctl21:m_txtTemp
I tried using both
_ctl21:m_txtTemp and _ctl21_m_txtTemp
in the second line of code above..