January 9, 2018

How to solve the script editor error "ERR_BLOCKED_BY_XSS_AUDITOR" in sharepoint

Introduction:
In this article we will explore , How to solve the script editor error "ERR_BLOCKED_BY_XSS_AUDITOR" in SharePoint

After adding javascript to script editor web part in the SharePoint pages and  trying to edit the page we will get the error as below. 


Solution: 
We can disable this by adding the below custom header to the web.config file as below. 

<add name="X-XSS-Protection" value="0"/>  "

After adding code to the web.config file: 


Note: This workaround will work only on on-premises environment.


Hope this article helps !!



Thanks for reading this article ! ! please leave your comments and suggestion about this article.
  



January 8, 2018

How to hide the html elements in SharePoint popup dialogs

Introduction:
In this article we will explore , How to hide the html elements in SharePoint popup page.

By  default SharePoint allows to hide the elements from popup dialogs using css class.

When creating custom master pages , we will add own branding html elements like headers , logos and footers to the pages. 

These elements are not required to be shown while opening the popup dialogs.


Solution: 
simply add the below cssclass to the html  elements to hide in the dialog

"ms-dialogHidden"



<div id="header" class="ms-dialogHidden">

</div>

<div id="logo" class="ms-dialogHidden">

</div>

<div id="footer" class="ms-dialogHidden">

</div> 

Sample Code added: 


OutPut: 


Hope this article helps !!



Thanks for reading this article ! ! please leave your comments and suggestion about this article.