You need coreinit.js
loaded before _spBodyOnLoadFunctionNames
can work, make sure its loaded bedorebefore running your script. _spBodyOnLoadFunctionNames
is an array, that are execute in the ProcessOnLoadFunctionNames
function. The ProcessOnLoadFunctionNames
is executed in the ProcessDefaultOnLoad
function. The ProcessDefaultOnLoad
is execute with: ExecuteOrDelayUntilScriptLoaded(ProcessDefaultOnLoad, "core.js");
You could also use ExecuteOrDelayUntilBodyLoaded(FunctionName());
or ExecuteOrDelayUntilScriptLoaded(FunctionName, "core.js");