Skip to main content


Showing posts from November, 2015

SharePoint script on demand

This is very old now and exists in market from long time for SharePoint, So thought of summarizing it once.
1.Create file with name ShareTechPoint.js and below content
function sayHello() {   alert("Hello"); } //Notify SharePoint that the custom file has loaded. SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("ShareTechPoint.js ");

2.Now write the below code in another  HTML/ascx/aspx file
<script type="text/ecmascript"> function runCode() { SP.SOD.RegisterSod(‘ShareTechPoint.js ',  '/StyleLibrary/ShareTechPoint.js'); var x = ExecuteOrDelayUntilScriptLoaded(sayHello,  "ShareTechPoint.js "); } </script> <input id="Button1" type="button" value="Run Code" onclick="runCode()" />

This is how you can implement Script on demand for SharePoint.

Client web part / App Part showing the blank iframe on page

Hello all - While creating first hello client web part many times people face this issue that there cleint web part show blank window after adding on page.

For showing content on page need to allow framing on page as client web parts loan in iFrame.


Check for above line of code on client web part file. If not preset add it there.