ExecuteOrDelayUntilScriptLoaded not executing after page publish
In SharePoint 2013 I have a page that is using the Script Editor web part. In the script editor web part I have the following:
ExecuteOrDelayUntilScriptLoaded(functionCall, "sp.js");
function functionCall() { alert('Hi'); }
How come the alert is called when the page is unpublished, but once I publish the page then ExecuteOrDelayUntilScriptLoaded() is not firing.
Ramesh PalaniappanPosted Nov 3, 2016, 9:14 AM
In SharePoint Client Object Model and after migration from SharePoint 2010 to SharePoint 2013 your Client Object Model code is running well when the page is Unpublished but once you Published it your Client Object Model Code is not working, don't worry this is not a bug but Microsoft did some changes in the "ExecuteOrDelayUntilScriptLoaded" method in SharePoint 2013 and renamed it to be "executeFunc"
SharePoint 2013 Code:
SharePoint 2010 Code: