I have a JSP page which has TD as follows: \[code\]<td align="right" id="DDD" style="display:none;"> <label for="DDD" accesskey="A">DDD: </label></td><td id="DDD1" style="display:none;"> <html:text property="DDD" styleId="DDD" readonly="true" styleClass="text" style="width: 8em; border: 0px solid buttonFace; background-color: transparent;" /></td>\[/code\]and the TD display is none/block based on Javascript. this is the javascript,\[code\]if(caseInfo[4] == "2"){ document.getElementById('DDD').style.display = 'block'; document.getElementById('DDD').disabled = false; document.getElementById('DDD1').style.display = 'block'; document.getElementById('DDD1').disabled = false; if(caseInfo[2].length >0 && caseInfo[2] != "NULL") { alert(caseInfo[2]); document.forms[0].DDD.value = http://stackoverflow.com/questions/13727720/caseInfo[2]; } else { document.forms[0].DDD.value =""; } alert("DDD1"+document.forms[0].DDD1.value);}\[/code\]When i run the application, in UI i see the lable but not the input fields and i see \[code\]document.forms.0.DDD1\[/code\] is null or not an object in the line \[code\]document.getElementById('DDD1').style.display = 'block';\[/code\]. this property is already set in form. any idea why it does not get displayed?