I am trying to write a function that returns all the members of a given group. My code seems to work just fine when I am looking at groups created in MOSS sites, but I can't seem to get it to work on my WSS sites. Anything I need to know? Can someone please point me in the right direction?
function GetGroupMembers(strWeb, strGrpName){
$("#myOutDiv").html("<table id='tblGroupMembers' class='ms-vb'><tr><th>ID</th><th>Name</th><th>UserID</th></tr></table>");
$().SPServices({
operation: "GetUserCollectionFromGroup",
async: false,
webURL: strWeb,
groupName: strGrpName,
debug: true,
completefunc: function (xData, Status) {
//var i=0;
if (Status == "success"){
$(xData.responseXML).SPFilterNode("User").each(function() {
$("#tblGroupMembers tr:last").after("<tr><td>" + $(this).attr("ID") + "</td><td>" + $(this).attr("Name") + "</td><td>" + $(this).attr("LoginName") + "</td></tr>");
});
}
}
});
return true;
}