General Bloging

Development and Stuff

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Hiding fields in Sharepoint 2007

To hide fields in the edit and newform pages for a list add the following Javascript to the top on the

default list pages using SPD 

 <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("Influence");
   control.parentNode.parentNode.style.display="none";
   control = findacontrol("Experience");
   control.parentNode.parentNode.style.display="none";
 
}
</script>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by gurney on Monday, February 23, 2009 9:40 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Truncate log files 2005

I always for get how to do this, and the  have to look it up when the dev box runs out of disk space.

backup log DBName with truncate_only

dbcc shrinkfile (DBName_log, 1)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: SQL server
Posted by gurney on Tuesday, February 17, 2009 1:24 PM
Permalink | Comments (0) | Post RSSRSS comment feed