Hello,
I am trying to set some columns in a list as "read-only" and is using the following code:
<script type=”text/javascript”>
function SetReadOnly()
{
var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
elements.readOnly=true;
}
_spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
</script>
But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part, or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
Thanks a lot!
Patrick