Free eBooks – From Microsoft Press

Hi Folks,

Microsoft has released three eBooks free of cost. Below is the information about the eBooks.

  1. Windows 10 IT Pro Essentials Support Secrets
    https://blogs.msdn.microsoft.com/microsoft_press/2016/07/14/free-ebook-windows-10-it-pro-essentials-support-secrets/
  2. Configuring Microsoft SharePoint Hybrid Capabilities
    https://blogs.msdn.microsoft.com/microsoft_press/2016/07/06/free-ebook-configuring-microsoft-sharepoint-hybrid-capabilities/
  3. Microsoft Platform and Tools for Mobile App Development
    https://blogs.msdn.microsoft.com/microsoft_press/2016/06/22/free-ebook-microsoft-platform-and-tools-for-mobile-app-development/

Making Field Read only in SharePoint 2010

Many times you need to disable the fields in SharePoint form for ‘New Item’. By using JavaScript we can disable field in easier way. Lets
discuss an example.

Using JavaScript

Find field id by inspecting element in browser’s developer tools. The filed id is something like this
‘ctl00_m_g_efe2ea91_242b_4746_bb44_5a67e8cbc5c2_ff331_ctl00_ctl00_DateTimeField_DateTimeFieldDate’

Then write down few steps to disable it.

function DisableField()
{
  try
  {
    var element = document.getElementById('ctl00_m_g_efe2ea91_242b_4746_bb44_5a67e8cbc5c2_ff331_ctl00_ctl00_DateTimeField_')
    element.disabled=true;
  }
  catch(err)
  {
  }
}

Now you need to call the function ‘DisableField()’ on body load.

SharePoint gives out of the box functionality for JavaScript developer to inject custom function into function list of SharePoint function lists.

You can push ‘DisableField()’ function as follows.

_spBodyOnLoadFunctionNames.push("DisableField()");

Enjoy JavaScript…

Fixed width, centered design in SharePoint site using css

By default SharePoint gives 100% width to sites created. We can fixed width of site by using custom css and changing some class names
in master page.

Lets have look to the solution.

div.s4-title.s4-lp, body #s4-mainarea, #s4-topheader2, #s4-statusbarcontainer
{
width: 960px;
margin: auto;
padding: 0px;
float: none;
background-image: none;
background-color: white;
}

To get fixed width design add css classes to the following element.

Default

<div id="s4-workspace">

Fixed Width

<div id="s4-workspace">

Default

<div id="s4-titlerow" class="s4-pr s4-notdlg s4-titlerowhidetitle">

Fixed Width

<div id="s4-titlerow"  class="s4-pr s4-notdlg s4-titlerowhidetitle s4-nosetwidth">

Fixed width, centered design in SharePoint site using css