function Initialize()
{
var context = SP.ClientContext.get_context();
}
}
Initialize();
if you have a error message "SP.ClientContext is null or not an object"
In order to avoid this error you should:
//add more this one.
SP.SOD.executeOrDelayUntilScriptLoaded(Initialize, 'SP.js');
function Initialize()
{
var context = SP.ClientContext.get_context();
}
}
//Initialize(); REMOVED
No comments:
Post a Comment