In the heading of my page, I have:
<script>
function insureSPServices(callbackFunction)
{
if($().SPServices == null)
{
jQuery.getScript("./scripts/jquery.SPServices-2014.01.js", callbackFunction);
} else {
callbackFunction.call(null, "Already Loaded");
}
}
function populate()
{
alert("SPServices loaded? " + (jQuery.SPServices == undefined ? "NO!!!" : "YES."));
}
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
alert("jQuery");
alert("!" + $().SPServices.SPGetCurrentSite() + "!");
alert("jQuery loaded? " + (jQuery == undefined ? "NO!!!" : "YES."));
alert("SPServices loaded? " + (jQuery.SPServices == undefined ? "NO!!!" : "YES."
));
insureSPServices(populate());
});
</script>
I get: JQuery YES SPServices NO!!! SPServices NO!!!
Notes: The two script paths are legitimate.
The SPServices script was downloaded from: http://spservices.codeplex.com/downloads/get/786994
The check/init logic is from here: http://devspoint.wordpress.com/2011/01/07/quick-way-to-load-spservices/
All help appreciated.
There might be several problems: