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

New Comment on "$().SPServices"

$
0
0
Very good from an SharePoint SME point of view. But from JavaScript SME point of view your code sometimes "hurts". I mean well, I mean no harm. Example call for GetUserInfo, might be for example : var waitMessage = "<table width='100%' align='center'><tr><td align='center'><img src='/_layouts/images/gears_an.gif'/></td></tr></table>", $WSO = $("#WSOutput"); $WSO.html(waitMessage).SPServices({ operation: "GetUserInfo", userLoginName: "SHARE1\\demouser", completefunc: function (xData, Status) { $WSO.html("<p>This is the output from the GetUserInfo operation:</p>"); $(xData.responseXML).find("User").each(function () { var $this = $(this); $WSO.append( "<li>ID: {0}</li><li>Sid: {1}</li><li>Name: {2}</li><li>LoginName: {3}</li><li>Email: {4}</li><li>Notes: {5}</li><li>IsSiteAdmin: {6}</li><li>IsDomainGroup: {7}</li>".format( $this.attr("ID"), $this.attr("Sid"), $this.attr("Name"), $this.attr("LoginName"), $this.attr("Email"), $this.attr("Notes"), $this.attr("IsSiteAdmin"), $this.attr("IsDomainGroup") ) ); }); } }); I hope you don't mind this ....

Viewing all articles
Browse latest Browse all 6517

Trending Articles