Pages

Tuesday, November 2, 2010

How to Hide ItemToolbar in SharePoint 2007?

Hello


We have business requirement which indicates that User should not see entire toolbar when they view any item, how to disable that?
Simple Approach with JavaScript inside the ContentEditor Webpart

<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideFields");
function hideFields() {
   var control = document.getElementById('controlID');
    control.style.display="none";
}
</script>

NOTE: you can find the control ID by downloading Internet Development toolbar and just select that element it will show that control ID.

Disha Shah

No comments:

Post a Comment