If at any point of time you are using ExecuteOrDelayUntilScriptLoaded in a page or specifically in a publishing page and finding it not working, there is a strong chance that you need to replace this function with other function called SP.SOD.executeFunc.
In SharePoint 2013, the correct way to execute function after script is loaded is to use SP.SOD class and not ExecuteOrDelayUntilScriptLoaded.
If its ExecuteOrDelayUntilScriptLoaded({functionname}, "sp.js");
then replace it with
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', {functionname});
This will also come handy specially when a user who has read / view only access the site where sp.js refuses to load when ExecuteOrDelayUntilScriptLoaded is used.
No comments:
Post a Comment