The reason behind this was that the SharePoint javascript Libraries have not been loaded fully when SP. functions were called, thus nothing happened, that is for example SP.ClientContext did not exist yet.
_spBodyOnLoadFunctionNames.push("LoadLastURL");
function LoadLastURL()
{
var myQueryString = ""; 1
var myContext = new SP.ClientContext.get_current();
...
}
The solution was simple, I just have to do the following
SP.SOD.executeOrDelayUntilScriptLoaded(LoadLastURL, 'SP.js');
function LoadLastURL()
{
...sharepoint javascript functions ....
}
No comments:
Post a Comment