Friday, August 31, 2012

Hide first link from global navigation

.s4-tn li.static > a{
display: none !important;
}
.s4-tn li.static > ul a{
display: block !important;
}

Wednesday, August 8, 2012

Hide column on SharePoint list forms - JavaScript

Hide column on Sharepoint Dispform.aspx, Editform.aspx, Newform.aspx using a JavaScript.
Copy the script on desired form under the
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"> tag:

<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideFields");
function findacontrol(FieldName) {
   var arr = document.getElementsByTagName("!");
   // get all comments
   for (var i=0;i < arr.length; i++ )
   {
      // now match the field name
      if (arr[i].innerHTML.indexOf(FieldName) > 0)
      {         return arr[i];      }
   }
}

function hideFields() {
var control = findacontrol("Column-1");
control.parentNode.parentNode.style.display="none";

control = findacontrol(" Column-2");
control.parentNode.parentNode.style.display="none";
}
</script>

Tuesday, August 7, 2012

Error 401.1 when browsed a web that uses Integrated Authentication and is hosted on IIS


1.       Click Start, click Run, type regedit, and then click OK.
2.       In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
3.       Right-click MSV1_0, point to New, and then click Multi-String Value.
4.       Type BackConnectionHostNames, and then press ENTER.
5.       Right-click BackConnectionHostNames, and then click Modify.
6.       In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
7.       Quit Registry Editor, and then restart the IISAdmin service.