Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPServices not loading,but alerts are showing

$
0
0
Hello,
here comes my scripts reference in the master page
<asp:ScriptReference Path="../../SiteAssets/js/jquery-1.8.3.js"></asp:ScriptReference>
<asp:ScriptReference Path="../../SiteAssets/js/jquery.SPService 0.7.2.js"></asp:ScriptReference>

and code here


//alert("jQuery loaded? " + (jQuery == undefined ? "NO!!!" : "YES."));
//alert("SPServices loaded? " + (jQuery.SPServices == undefined ? "NO!!!" : "YES."));

$(document).ready(function()
{
$().SPServices({
  operation: "GetGroupCollectionFromUser",
  userLoginName: $().SPServices.SPGetCurrentUser(),
  async: false,
  completefunc: function(xData, Status) {
   if ($(xData.responseXML).find("Group[Name='Site Admin']").length == 1) {
    alert('Yes,Its Admin')
    }   
         }
});
});

I tried the above commented lines,my jquery is getting loaded ,but SPService is giving a no alert(not loading :( ) .. I tried an alert insdie SPService and i successfully got the alert,i dont understand wats the prob is !! >> pls help

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>