Created
November 6, 2012 17:46
-
-
Save vgrem/4026298 to your computer and use it in GitHub Desktop.
Google Chart Tools -initializing data source for organizational data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadOrgChart() { | |
var soapEnv = | |
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \ | |
<soapenv:Body> \ | |
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \ | |
<listName>" + google.OrgChartData.ListName + "</listName> \ | |
<viewFields> \ | |
<ViewFields> \ | |
<FieldRef Name='" + google.OrgChartData.TitleFieldName + "' /> \ | |
<FieldRef Name='" + google.OrgChartData.TooltipFieldName + "' /> \ | |
<FieldRef Name='" + google.OrgChartData.ParentFieldName + "' /> \ | |
<FieldRef Name='" + google.OrgChartData.StyleFieldName + "' /> \ | |
</ViewFields> \ | |
</viewFields> \ | |
</GetListItems> \ | |
</soapenv:Body> \ | |
</soapenv:Envelope>"; | |
$.ajax({ | |
url: L_Menu_BaseUrl + "/_vti_bin/lists.asmx", | |
type: "POST", | |
dataType: "xml", | |
data: soapEnv, | |
complete: onOrgChartDataLoaded, | |
contentType: "text/xml; charset=\"utf-8\"" | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment