Questions tagged [ajax]

An acronym for Asynchronous JavaScript and XML

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

Consolidate link items in Sharepoint list and place in separate variables

I have gotten assistance on some code I have been work on. The assistance got me so far but I can figure this one error, Data is not a function. I'm trying to consolidate like string names loaded on ...
TonyT's user avatar
  • 101
1 vote
1 answer
42 views

Alternate data result SPFX

Hi all I'm trying to build an spfx webpart for project server 2019 (on prem)... Everything it was working good, I used this css but now I faced an interesting question, css have two elements container ...
Douglas Filipe's user avatar
1 vote
1 answer
290 views

Ajax call to SharePoint API returns '403 - Forbidden'

I need to access data on a SharePoint Online site from a php application. I'm using SharePoint API with JavaScript trying to achieve this. I already succeeded in accessing the SharePoint site with ...
Emmanuel Ingelaere's user avatar
0 votes
1 answer
527 views

Getting the ID of a lookup column?

I have a list which has a lookup column in it. "Subcats" has a lookup to "Cats". If I do an ajax call like this url: _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/...
Pete Whelan's user avatar
0 votes
2 answers
126 views

Which columns are being returned from an AJAX call?

I know the names of some columns - FirstName, LastName, JobTitle, SAMAccountName, Department that an API serves out but I would like to know all the columns that are returned. How do I find out the ...
Pete Whelan's user avatar
0 votes
1 answer
63 views

POST to SharePoint Task List Results in Bad Request?

I am loading all my data with a GET to populate to a DataTable. When a row is selected and drawn to a new table, it deletes from the DataTable as well as the SharePoint list it came from. I am trying ...
BeerusDev's user avatar
  • 113
0 votes
1 answer
956 views

AJAX Request to sharepoint REST API But receiving CORS error

I want to request a sharepoint server with ajax but I get an CORS error : How can I solve this issue please $.ajax({ url: "http://myserver.com" + "/_api/web/Lists/GetByTitle('...
rezouane marimouttou's user avatar
1 vote
0 answers
106 views

Unable to show progress bar using SharePoint REST API

I am trying use XMLHttpRequest to show a progress bar when uploading files to a SharePoint list via REST api. The same code works on this codepen even without the parser.php file. Just trying to show ...
martinbshp's user avatar
0 votes
1 answer
2k views

Filtering listview using React Sharepoint

I am trying to display data in react-data-table-component according to the input given in the search field using Rest API. For eg: If a user enters name of the person the react-data-table-component ...
Dhanjay Bhardwaj's user avatar
0 votes
1 answer
624 views

How to enable Cors with URL Rewrite Sharepoint 2016?

I am getting CORS policy error. I am trying to use URL Rewrite plug in. I have IIS 10. I tried the examples(links) below, but it still didn't work. So What can i do more? https://techcommunity....
f_gulay's user avatar
  • 641
0 votes
1 answer
1k views

How can i find the Lookup Column id when i pass the data to REST API?

As shown in some examples I must use lookup column ID when i pass data to Rest API. But I cannot find what the lookup column's id. So How can i add this id to data in rest api? JSON.stringify({ '...
f_gulay's user avatar
  • 641
0 votes
0 answers
107 views

I get CORS error in SharePoint. I also changed web-config but nothing happens

I call AJAX request and the browser got CORS error. I tried to add "Access-Control-Allow-Origin" in IIS web.config. But it doesn't work. I have two servers. My AJAX is true only when I have ...
f_gulay's user avatar
  • 641
0 votes
1 answer
428 views

AJAX POST Call to More Than One SharePoint List

I have been working on a project for quite some time now. I have found this post somewhat useful, but am unsure if it is correct or not for my utilization. Functionality: Read in SharePoint list ...
BeerusDev's user avatar
  • 113
0 votes
1 answer
847 views

AJAX POST Request to SharePoint List from HTML Form

I have been working on a project for quite some time now. Functionality: Read in SharePoint list items from 8 different subsites with a GET request. Populate those items in an orderly(grouped) ...
BeerusDev's user avatar
  • 113
0 votes
1 answer
84 views

_x0020_ Not Working in AJAX

so I have 8 different SharePoint lists I am pulling from. And for aesthetic purposes I want to change the listname from something like "Program1" to "Program 1" as it doesn't ...
BeerusDev's user avatar
  • 113
0 votes
1 answer
500 views

SharePoint How to return item field value by Ajax

Good day, I have the List. The List has checkbox field "DocOrg". The user must select checkbox "DocOrg" value and the script must send ajax query to another list, find another list ...
Anonymous's user avatar
0 votes
1 answer
1k views

Create new list item with REST API and get item ID in function callback

Sometimes I need to create a new item with an attachment to a list in Sharepoint by using REST API. What I used to do to achieve this task was to first create the item in the Sharepoint list by using ...
supertrip86's user avatar
1 vote
1 answer
245 views

OnSuccess of Ajax request check if array contains data

I have an Ajax request, when it gets to on success function I start to do things with data.d.results like reading through and filtering in another REST API. However sometimes data.d.results.ID for ...
Dale's user avatar
  • 35
0 votes
0 answers
62 views

SharePoint Document's Library metadata duplicates after REST call

I am making a POST ajax request to a SharePoint Document Library folder to save a file along with some metadata. The file and the metadata are saved correctly however, the metadata are sometimes(not ...
David Sagang's user avatar
0 votes
1 answer
26 views

SP2016: How can I add visit counter for documents?

My SharePoint site has anonymous access and extended for internet. I want to stroe anonymous number of visits for each document (such as Images, Videos, and etc.) and show to all anonymous visitors. ...
Prince Dariush's user avatar
0 votes
0 answers
156 views

Adding multiple Items to a share point list with javascript

I have a issue with a bit of code and Chrome, I have this function below that takes the array softArr and adds each item to a sharepoint list function testAdd(softArr) { console.log("Entered testAdd"...
adam Wadsworth's user avatar
1 vote
2 answers
4k views

Corrupt or blank file when downloaded from Sharepoint using rest API ajax call javascript

I am trying to download a file from Sharepoing using ajax call from html page. I am able to upload successfully but when I try to download a file, in case of text file, the download is successfull and ...
Samir's user avatar
  • 113
1 vote
1 answer
131 views

Best way to update all the items in a Sharepoint 2013 Document Library through REST API

In a web application I am rendering a list of documents coming from a Sharepoint 2013 Document Library (the number of documents can vary, approximately, from 5 to 50). The user needs to be able to ...
supertrip86's user avatar
1 vote
1 answer
42 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 ...
aRip's user avatar
  • 11
0 votes
1 answer
26 views

How to do an if/then in to handle if a Parameter isn't being passed to the api

I have a SharePoint 2016 page that expects a parameter and dynamically builds the url for the API call based on that parameter. But, I'm struggling with what/how to do an if/then in my ajax to handle ...
Susan T.'s user avatar
  • 141
0 votes
1 answer
471 views

How do I insert a value in a radio button based choice column in a SharePoint 2013 list using REST API in JavaScript?

Here are the columns I have in the backend list. Here's how I am sending the data to the backend list through a POST request using AJAX. var item = { __metadata: { type: "SP.Data.ListNameListItem"...
psvs's user avatar
  • 3
0 votes
1 answer
263 views

Using AJAX to get SharePoint group user names? [duplicate]

Very often Ajax is used to get list items, delete them, update them etc. I want to know how I can use ajax to get the usernames of a specific SharePoint group. (Just printing them on the console is ...
user1234567890's user avatar
0 votes
2 answers
958 views

Trying to get an Excel document through ajax, running into async issues

I'm adding JavaScript to a SharePoint and I'm trying to write a function that gets an Excel document, or rather the data in it, from a library. I've already figured out how to do that, but the files ...
user87293's user avatar
  • 115
0 votes
3 answers
5k views

How to resolve TypeError: Converting circular structure to JSON when creating SP list item?

Trying to create a list item in SharePoint using REST, getting the following error message: Uncaught TypeError: Converting circular structure to JSON Am I missing something obvious here? $.ajax({ ...
BDC604's user avatar
  • 403
0 votes
0 answers
21 views

I need to take some XML/SP Services code and rewrite using ajax

I was given this XML code and they would like to convert it into ajax code. I have never worked with XML/SP Services and I am not sure if what I have done is right. var accID = 'AIRLINES'; var ...
DigiDev's user avatar
  • 15
0 votes
1 answer
65 views

I have an old webpart in XML and using SP services. I need to convert using Ajax

I was given an old webpart using SP services and XML. I was requested to use Ajax. This is the first time I do this kind of conversion and I am not sure if I am doing it correctly. This is the old ...
Juan Angelogianopulos's user avatar
0 votes
1 answer
32 views

Creating Custom WebPart -- RangeErrror / TypError trying to access data from a file

Hi I'm new to using SharePoint and I'm trying to transfer over an Employee Directory Search app from a website to SharePoint Foundation 2013. I'm not able to use the same code in my .JS file and am ...
staysee's user avatar
0 votes
1 answer
26 views

What is correct syntax to update SP multiperson column with array or string variable via rest api?

Can't get the syntax right to update a SharePoint multiperson column. some variables: iArray // = array of multiple user ids sArray = iArray.join(); // string of multiple user ids json1 = "{'results'...
BDC604's user avatar
  • 403
1 vote
3 answers
5k views

How to use Promise.all and ForEach to make ajax call per array item?

I have 2 arrays with email address that I want to feed to the function below, one after the other (not in parallel) and then perform a final function. I've been looking at examples trying to figure ...
BDC604's user avatar
  • 403
0 votes
1 answer
368 views

How to fix ajax call to get user id returns undefined if same url works directly in browser?

I have an array with a few user email addresses in it, trying to iterate through the array and get Ids. Console log is telling me xuser is undefined. When I manually enter the url below into the ...
BDC604's user avatar
  • 403
0 votes
1 answer
26 views

How do I filter elements from a Share Point list by category in Java Script

I have a created an accordion that has 7 different categories (Auto, Entertainment, Health and Beauty, etc). The content of each category lives in a SP2013 List; each list item was given the ...
DigiDev's user avatar
  • 15
0 votes
1 answer
929 views

How to use SharePoint REST API to get newest list item?

I am trying to get the newest item added to a list. Get item by ID works for single item: $.ajax({ url: xurl + "/_api/web/lists('" + xlist + "')/items/getById(123)", type: "GET", headers: { "Accept"...
BDC604's user avatar
  • 403
0 votes
2 answers
51 views

SharePoint Custom Webpage/Part Not Consistently Loading

I hope this is the right place I have been in a role within my organization working with SharePoint for a couple of months now, so i'm a newb more or less. I have some experience (again a novice) ...
K Henson's user avatar
1 vote
1 answer
625 views

Get person display name from list via javascript

I am facing problem that i cannot solve. I have a function which works properly but returns number id of user from sharepoint not display name. Here is the function: function getItems() { $.ajax({ ...
Rudolf's user avatar
  • 17
0 votes
1 answer
741 views

403 FORBIDDEN error while trying to insert an item in a SharePoint list

Hi I am trying to insert a list item in a SharePoint list by using REST api. I am getting an error as: { "readyState": 4, "responseText": "{\"error\":{\"code\":\"-2130575251, Microsoft....
Purushottam Patil's user avatar
0 votes
1 answer
134 views

Updating a badge when a new item is added to a list

Hello I am trying to update a badge every time a new item is added to the list. I am making an Ajax call to the list and created a function with a counter; I also created a function with a setInterval ...
Juan Angelogianopulos's user avatar
0 votes
3 answers
4k views

Get List Item ID for file in Document Library

I've got a document library which has folders in it. I can get a given folder and iterate through the documents in the folder via REST just fine. What I need to do is get some of the list item ...
Scott Davis's user avatar
2 votes
1 answer
3k views

upload file to SharePoint Online via REST API issue

I have a highly customized Edit form for a list. To make life easier for users, and to manage the size of the list better, instead of attaching files directly to the list, we set up a documents ...
Scott Davis's user avatar
0 votes
1 answer
845 views

Unable to grab files inside folders on SharePoint using PnP js

Does anyone have some reference on why I'm unable to pull in files from a folder in SharePoint? This is what I have so far, this will be my PnP js call (I don't I'm not doing something right) <...
SLE's user avatar
  • 273
0 votes
1 answer
193 views

Ajax is being called in Chrome but not IE

I'm using Ajax calls to pull in data for a table and I have successfully been able to pull in data for Chrome and everything shows up perfectly fine, but my table is not wanting to show up in IE at ...
SLE's user avatar
  • 273
0 votes
0 answers
35 views

Unable to pull in People or Group column using Ajax

I'm pulling in data from a SharePoint list and I'm able to successfully pull in data for the "Single text/Lookup" columns, but for some reason I'm unable to map through and pull in the People/Group ...
SLE's user avatar
  • 273
1 vote
2 answers
8k views

Rest API Post Request Returns '403 Forbidden'

I am trying to create a new choice (radio buttons) field using REST API request in my SharePoint Online environment and this is the code I'm using: $.ajax({ url: "https://mydomain.sharepoint.com/...
Gintas K's user avatar
  • 1,227
1 vote
1 answer
109 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. ...
seaandtea's user avatar
0 votes
1 answer
493 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 ...
Joseph Cain's user avatar
1 vote
1 answer
859 views

AJAX REST call to POST to SharePoint list generates error

I am having difficulties with the JQuery implementation of AJAX to make REST calls to POST data to add items to my SharePoint list. Using 'GET' to retrieve information gives me no issues. Given the ...
BWieland86's user avatar

1
2 3 4 5
7