Questions tagged [jquery-ajax]

With the jQuery AJAX methods, you can request text, HTML, XML, or JSON from a remote server using both HTTP Get and HTTP Post - And you can load the external data directly into the selected HTML elements of your web page! Without jQuery, AJAX coding can be a bit tricky!

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

Fetching User's profile thorugh Graph API into webpart in SPFX

How can we fetch a user profile photo through Graph API and display into Web part in SPFX? Here is my function to call Graph API to fetch Specific user's Profile Photo filtering through their Mail ...
0
votes
0answers
19 views

Ajax calls skipping .then method javascript

We are getting information from a 3rd party API. Below is the code that communicates with the API function getDistfromSAP(root) { var deferred = $.Deferred(); $.ajax({ async:false, ...
0
votes
1answer
47 views

Fetching the data through Graph API in the webpart using sharepoint framework

[I am trying to fetch my email messages through Graph API into the webpart in sharepoint framework] In the webpart Not getting the details of my emails through Graph API Error : Cannot read property ...
0
votes
2answers
74 views

Rest api returns undefined

I am trying to get a random list item field from a sharepoint list. but the results return is undefined. The URL of the rest api is correct as i copy and past it directly to the browser it displays ...
1
vote
2answers
34 views

REST API: Send Auth only for the one request

I'm working on a little SP On-Premises 2016 project. I have to make several request to different Site-Collections in the farm. I'm making those requests with an Ajax-Call inside a Script-Editor ...
1
vote
2answers
290 views

running multiple ajax calls synchrnously in SharePoint rest api

I have written javascript REST API code with two AJAX Calls. Code is like below: $.ajax({ onSuccess(function(){ for(let i=0;i<=data.d.results.length;i++) { GetEmployeeDetailsFromOtherList(data....
1
vote
1answer
30 views

Sharepoint access to API

I was asked to develop a program that extracts the properties of each user profile. I'm using ASP.NET Core and Visual Studio and I'm trying to use AJAX and Javascript to do the requests. Here's my ...
0
votes
2answers
38 views

jQuery AJAX list Get $.deferred..nothing happens

I am trying to use jQuery deferred to cache data into arrays coming from lists so I can use throughout my code for efficiency. Unfortunately, I am unable to do so. I don't get any errors but nothing ...
0
votes
1answer
612 views

502 bad gateway azure app service + provider hosted add-in

I have a provider hosted add-in deployed to azure web application (app service). I have a long running task, iterate through all site collections (including sub webs) in tenant and perform some task ...
0
votes
1answer
420 views

Creating folder in SharePoint Library using Rest API

I want to create a folder inside "Communications" document library in below site using rest api. https://contoso.sharepoint.com/sites/SP Can you please assist on how to do that?
0
votes
3answers
1k views

How to insert data into a SharePoint multi-select field?

I have a form that has a few multi-select choice fields. When I try to add an item, I get an unusual error below. I am using the Vue.js framework. "value: "A node of type 'StartArray' was read ...
2
votes
1answer
2k views

XMLHttpRequest to login.microsoftonline.com Access-Control-Allow-Origin issue

I am trying to get token from https://login.microsoftonline.com it gives me error But If I use https://cors-anywhere.herokuapp.com/ its works but requirement is to call this function every 2 min from ...
0
votes
1answer
29 views

Error inserting data into SP list using REST API

I've never seen this error before and I've used REST API many times. I am in SharePoint Online so maybe it behaves differently. Whenever I insert and item into a list using REST, I get the ...
1
vote
1answer
100 views

How to return results from executeQueryAsync

I know this has been asked before here and I've viewed several similar questions, but I'm just not getting it and could use some assistance. I'm currently reading a file in SharePoint's library via an ...
0
votes
3answers
429 views

How to insert selected Checkboxes via Sharepoint 2016 API

I've been able to piece together the following code that "builds" a checkbox list in Sharepoint 2016. That was step one. Now, I'm trying to figure out how to loop thru the whole list of Departments ...
1
vote
2answers
33 views

Asking credential popup on sharepoint 2013 public facing site

I have sharepoint 2013 site as public facing migrated from 2010. I have one page where I am getting items from the list using rest api. when i access this page without login as an anonymous user it ...
0
votes
1answer
115 views

Calling a WCF Service with jquery ajax from Sharepoint Online

I'm using Sharepoint 365. I would like to call a WCF Service located in a server in my intranet to read data using a script editor webpart and jquery ajax. Anyone has any example of how to accomplish ...
0
votes
1answer
136 views

What are the required modifications in web.config in sharepoint site to expose URL to ajax call

I'm new to working with sharepoint. When i tried to call share point API url from ajax call in JavaScript. But, it's continuously failing and throws the error. I can say, that is CORS error. So, i've ...
0
votes
1answer
520 views

SharePoint Rest API Patch request to update list item not working

I have an application build up in SharePoint 2013. In one of the custom list form, we are trying to update list item using Rest API call with type Patch. Few users are getting a response {"...
0
votes
1answer
117 views

Get item from external list field with ajax - SP2013

I have a list and some columns retrieve value from external list. How to get all items from that list(attached img) with REST I'm trying like this function traerSolicitudes() { var lista = "...
0
votes
2answers
344 views

Get value from Column and cut the duplicates using SharePoint Rest API

I've multiple folders inside the pages library Within each folder I have pages Grupo de produtos is of type taxonomy. I run the function GetPagesProd and for each item I get the value from Grupo de ...
0
votes
1answer
250 views

Page to show “Modified By” and “Last Modified Date” of file in file library

I have a .csv file in a file library, i would like to know if is there way to display in some page when the .csv file was last modified, and who did. Does anybody know any code in to get this ...
1
vote
1answer
77 views

Can't retrieve all Items from all lists that reside on a single subsite

SP Community, I am absolutely stumped and desperate for help. I have been up and down StackExchange trying to get 3 separate attempts to - 1. query all of the lists within a subsite and to then - 2. ...
0
votes
1answer
250 views

How To: Filter A Query on All Lists Based on Title Contains

I have queried all of the lists within a subsite but need to filter based on criteria in the title. I then need to display the filtered list contents. Is this possible if the list contents are not ...
0
votes
1answer
378 views

AJAX to Angularjs Response SharePoint

Can someone give me some assistance in converting this AJAX get list items to $http? Specifically I am trying to get the different fields to $scopes. I am aware that when doing $http now you can no ...
1
vote
1answer
185 views

Error reading syndication item: 'Data at the root level is invalid. Line 1, position 1.'

First time playing in this environment: Sharepoint 2010. I have access to very limited tools: browser, notepad and the Internets. Feeling a bit rusty, haven't programmed in a while and I'm having a ...
1
vote
1answer
852 views

Rest API to query User Information List

I am experimenting with some Rest API code. My knowledge of javascript and jquery is basic but I know enough to usually get what I need. Usually through trial and error. Here is what I am attempting ...
0
votes
1answer
76 views

Retrieve one library from each site and show the last item using ajax

My senario is like this: In every site there is a list called Projects. I need to loop through each sub site and retrieve the last item from Projects list, and display them on a page in tabular ...
0
votes
1answer
242 views

SharePoint 2013 - retrieve error using item id

I got a problem with the item id, at the moment i could create a new item without problems but i can't read it since i delete 2 items, now when i try to retrieve the item properties i got this error :...
0
votes
1answer
459 views

403 on /_api/web/webs if I don't have access to 1 subsite out of many

I have a REST call to mysite/_api/web/webs, I get a successful response, but if i remove permission from mysite/subsite01/ I get a 403, even if I have access to mysite/subsite02/ mysite/subsite03/. I ...
0
votes
2answers
717 views

CAML Query vs Odata Query string operators

For getting SharePoint list values through rest. I came through two solutions writing CAML Query in the body of AJAX call Odata query selector operators(eq: select,expand) in the url ...
1
vote
2answers
1k views

How to use CAML query with rest

I am trying to get list data with an id from my SharePoint online through REST. I have my ajax call like below. getFunction:function(id){ return new Promise(function (resolve, reject) { $.ajax({ ...
1
vote
1answer
750 views

Look Up value through REST without select or expand

Can we get the lookup value from SharePoint list through REST without using the query operators (select/expand) ?
0
votes
1answer
873 views

How to change null value to empty using REST

How to change null value to empty string in Sharepoint custom script? Here is my code. $(document).ready(function() { getUserListItems() }); function getUserListItems() { var ...
1
vote
1answer
489 views

Update attachment file in SharePoint using custom JavaScript

Anybody know how to update attachment file in list item using javascript? Any idea are so much appreciated.
0
votes
1answer
2k views

SharePoint date field value using jQuery

I have the input type as text for the date field and I am confused how to store the same in a variable and on change of that date function need to populate other column values SharePoint list. I need ...
1
vote
0answers
562 views

Call to Search REST Api with jQuery results in 401 Unauthorized

I have been trying to make a call through jQuery to the Search REST API but I'm always getting' 401 Unauthorized, this is my code var siteUrl = "http://myspserver:27180/sites/eyksmainportal"; $(...
0
votes
1answer
274 views

jQuery and REST API to list all subsites and users in those subsites with full control

I'm looking to display on a web part in SharePoint online a list of all sub-sites and all users with full control to that particular site i.e. Team Site Site Owners https://ab/...
0
votes
2answers
606 views

SPServices CompleteFunc returns error

I have a problem with getting items using SPServices: <script src="servername/SiteAssets/jquery-1.10.0.min.js"></script> <script src="servername/SiteAssets/sputility.min.js"></...
0
votes
1answer
1k views

SharePoint populate Choice field value using jQuery

var ArrivalCity = (data.aircraftView[0].arcftSchedList[0].tripArrivalCity); $('select[title="Select the Destination"]').val(ArrivalCity); var ArrivalCity1 = (data.aircraftView[1]....
0
votes
3answers
2k views

SharePoint Single line of text field value using jQuery

var ArrivalCity = (data.aircraftView[0].arcftSchedList[0].tripArrivalCity); $('input[title="Origin"]').val(ArrivalCity); Here the origin is a single line text box field where I am populating ...
0
votes
1answer
994 views

Is it posible to upload file in Lists Attachments in SharePoint in custom way

Is it posible to upload file in Lists Attachments in SharePoint in custom way I already tried using REST and JS but I am facing an error and it can't upload if it's posible kindly suggest what way to ...
2
votes
2answers
524 views

How to attach file in sharepoint I am using that function but its error [duplicate]

What is the problem with this? Im trying to attach file in SharePoint. <!DOCTYPE html> <html> <head> <title>Sample</title> <script type="text/javascript" ...
1
vote
2answers
64 views

Attachment File using REST was failed to upload with the problem of SP.RequestExecutor.js

How can I add attachment in SharePoint I am stuck on this problem hopefully can help me to proceed this problem. I will so much appreciate your help. Thank you.
0
votes
1answer
665 views

Ajax call to Rest service not working(no response)

I am trying to call a rest service using ajax in SharePoint online list form by adding a web part. Here is the code attached. SharePoint is https where as my java rest service is http. I am confused ...
0
votes
1answer
289 views

Context.ExecuteQueryAsync not trigerring

I am debugging the code below and the line Context.ExecuteQueryAsync is not being trigerred. I am not getting any error. async function updateListItem(listName, itemId, itemProperties, pageurl, ...
1
vote
1answer
311 views

Populate Specific items of the SharePoint Online List using Java webservice when a Drop-down column is selected while creating a new item

I need to populate certain columns of the list when I select a value from the dropdown column in the same list. Say for example I select create Item in the list and then I have a column called ...
0
votes
1answer
188 views

How to add time stamp in addition to user name profile property

I am using below code with reference to this thread: Yes/No (check box) - who updated field on the custom list item Basically when a user checks on a yes/no column, it shows/prints the user name who ...
0
votes
2answers
3k views

Populate textbox based on dropdown selection from a Sharepoint list

I have a SharePoint list called "Products" (containing 4 columns - Product, Manager, Approver, Status) I have a dropdown list that populates the 'Product' column of the 'Products' list. Say I select ...
2
votes
1answer
903 views

constructing an expand with REST API

I am having trouble to create an expand query using the REST API. I have two lists which are linked. PIR Title, Date, Number SIR Title, PIR2SIR (lookup to Title in PIR), Date, Number Now I want to ...