function HideDeleteItem()
{
var aList=document.getElementsByTagName("a");
for(i=0;i
if(aList[i].innerHTML=="Delete Item")
{
aList[i].parentElement.parentElement.style.display="none";
}
}
}
This can also be achieved using jQuery.
$(document).ready(function() {
$(”td.ms-titlearea”).hide();
$(”a[title='Delete Item']“).parent().parent().parent().hide();
$(”td.ms-separator:nth-child(4)”).hide();
});
The advantage of using this jQuery is that it also hides the separator whereas the other normal function doesn't help to achieve this.
it hides the button , but it appears for a brief period of time when the page loads... can we stop that?
ReplyDeleteI think the easiest way to do -
ReplyDeleteOpen SPD > EditForm.aspx > in code find standard toolbar webpart code > Make the Control Mode to "New" which will get rid of "Delete Item"