Monday, April 27, 2009

JavaScripts to Disable controls on Newform.aspx/Editform.aspx

JavaScripts to Disable controls on Editform.aspx


for(var i = 0; i < document.aspnetForm.elements.length; i++)
if ((document.aspnetForm.elements[i].title == "Recommendation")) // give the title of the control that you want to disable
{
document.aspnetForm.elements[i].disabled =
true;
}

No comments: