<script type="text/javascript" src="/SRC/SRCjQuery/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="/SRC/SRCjQuery/jquery.SPServices-0.5.4.min.js"></script>
<script type="text/javascript">
/* place code right before the matching closing tag </asp:Content> for <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">*/
$(document).ready(function() {
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function(xData, Status) {
if($(xData.responseXML).find("Group[Name='GroupName']").length == 1) {
$("#zz9_ID_PersonalizePage").remove();
/* zz5_ID_LoginAsDifferentUser
zz6_ID_RequestAccess
zz7_ID_Logout
zz8_MSOMenu_ChangePassword
zz9_ID_PersonalizePage */
}
}
}); /*close().SPServices({ */
}); /* close (document).ready(function() { */
</script>
GetAllUserCollectionFromWeb
$().SPServices({
operation: "GetAllUserCollectionFromWeb",
webUrl: "http://url/s",
completefunc: function (xData, Status) {
$(xData.responseXML).find("User").each(function() {
var perms =$(this).attr("RoleName");
var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
i=1;
if(i==1)
{
alert(liHtml );
}
i=i +1;
});
}
});
No comments:
Post a Comment