Questions tagged [ajax]

An acronym for Asynchronous JavaScript and XML

Filter by
Sorted by
Tagged with
0
votes
1answer
21 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 ...
0
votes
0answers
14 views

How can one fetch values via JavaScript from a SharePoint list with columns that have values stored via term store

I have a jqGrid where 2 columns have values which come from the termstore. The values in the column "Mandant" and "Vertragspartner" are stored via term store management tool and ...
0
votes
0answers
7 views

How to store content of redirected page into a popup form

This is my Webpart in Sharepoint workbench Clicking on the Task-name , redirected to the new page with default pop-up Form This is my redirected page with default pop-up form Is there anyway to show ...
0
votes
1answer
95 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('...
1
vote
0answers
40 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 ...
0
votes
1answer
495 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 ...
0
votes
1answer
155 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....
0
votes
1answer
223 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({ '...
0
votes
0answers
19 views

How to pass Lookup column data to Sharepğoint UpdateList Rest Api?

I have one lookup column and normal columns. I want to change the column's value. There is no mistake when i try to change normal columns. But if i want to change lookup column, I had this error ...
0
votes
0answers
77 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 ...
0
votes
0answers
12 views

How to enable url in different domain, I get CORS policy error when calling ajax query in Sharepoint 2013

How to enable url in different domain, I get CORS policy error when calling ajax query in Sharepoint 2013 I did my ajax call properly, also i saw the results Internet Explorer. It works fine. But ...
0
votes
1answer
42 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 ...
0
votes
1answer
119 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) ...
0
votes
0answers
25 views

Unexpected token '<' - but what is the correct syntax

I have the following code from a working Postman GET to retrieve a Bearer token, but I can't figure out the proper way to convert it to a working jsFiddle or On Submit in a form generator. It must be ...
0
votes
1answer
30 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 ...
0
votes
1answer
106 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 ...
0
votes
1answer
189 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 ...
1
vote
1answer
61 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 ...
0
votes
0answers
37 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 ...
0
votes
1answer
16 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. ...
0
votes
0answers
32 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"...
1
vote
2answers
2k 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 ...
1
vote
1answer
55 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 ...
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
1answer
21 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 ...
0
votes
1answer
204 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"...
0
votes
1answer
64 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 ...
0
votes
2answers
300 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 ...
0
votes
3answers
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({ ...
0
votes
0answers
15 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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
22 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'...
1
vote
1answer
3k 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 ...
0
votes
1answer
109 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 ...
0
votes
1answer
17 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 ...
0
votes
1answer
459 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"...
0
votes
2answers
43 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) ...
1
vote
1answer
286 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({ ...
0
votes
1answer
357 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....
0
votes
1answer
87 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 ...
0
votes
3answers
2k 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 ...
2
votes
1answer
2k 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 ...
0
votes
1answer
461 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) <...
0
votes
1answer
150 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 ...
0
votes
0answers
27 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 ...
1
vote
2answers
6k 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/...
1
vote
1answer
78 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
393 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
714 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 ...

1
2 3 4 5
7