Friday, June 24, 2016

Check if SharePoint page is in edit mode in Javascript

If embedded javascript code needs to check if the sharepoint page is in edit mode, the script below can be used.

var inDesignMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;

if (inDesignMode == "1")
{
    // page is in edit mode
}
else
{
    // page is in browse mode
}

Copied from http://sharepoint.stackexchange.com/questions/12792/how-do-i-know-if-the-page-is-in-edit-mode-from-javascript

No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...