New answers tagged

0

You can try below code Approach 1 : $(document).ready(function() { var userID = <<input your user ID >> var siteUrl = <<input site url>> var soapEnv = "<?xml version='1.0' encoding='utf-8'?> \ <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/...


1

Liz, I was having similar issue but I followed this link http://summit7systems.com/who-needs-a-data-view-web-part-sharepoint-rest-and-datatables-net and it worked perfectly. Following is my code (see if it's helpful) <script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script> <link ...


1

You have to explicitly request for a JSON response (if the default response is XML) You need to give the server the RequestDigest (unique token) to prove you are who you are headers: { "accept": "application/json;odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val() }


0

Couple of issues Person class should be set as Serializable GetDate method accepts 0 parameters but you are passing two values from the Ajax call. Sample Service public partial class Services : LayoutsPageBase { [WebMethod] public static string Hello() { return "Hello"; } } Sample Ajax Call var url = _spPageContextInfo....



Top 50 recent answers are included