Questions tagged [ajax]

An acronym for Asynchronous JavaScript and XML

Filter by
Sorted by
Tagged with
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
0answers
12 views

ValidateUpdaeListItem Ajax

I would like to post an ajax call to update a list without updating the version. I was told I can make use of the ValidateUpdateListItem() function. However, when I try using it, I have the error: ...
0
votes
1answer
35 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
24 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
26 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
0answers
14 views

Getting a document via ExcelRest: Request Entity Too Large

I'm currently attempting to get a file from my SharePoint library by making an AJAX query to ExcelRest. I'm able to return a document in this way, but when I attempt to get the document I need I get ...
0
votes
3answers
2k 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
10 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
0answers
34 views

I was given a XML web part that uses SharePoint Services. I need to convert it into an ajax/JSON webpart

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. When I open the ...
0
votes
1answer
27 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
0answers
20 views

How to call full size BannerImageUrl using ajax in Sharepoint Framework

I am creating a news webpart and need to call the banner image for different news articles. The parameter BannerImageUrl is technically 'working,' but is returning a very low res (300x200) thumbnail ...
0
votes
1answer
24 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
21 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
1k 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
17 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
16 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
227 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
38 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
78 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
169 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
50 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
493 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
774 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
0answers
296 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
68 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
24 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 ...
0
votes
2answers
3k 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
68 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
294 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
405 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 ...
0
votes
1answer
62 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 ...
1
vote
0answers
15 views

I want authors to be able to edit some items on the site using REST api

I am new at using REST api and fairly new to sharepoint. I got assigned a project to design a home page, which I already did and my boss wants the authors to be able to edit some of the fields on the ...
1
vote
0answers
21 views

How to Get User-Generated Columns from Ajax

Is it possible to determine which columns in a SP List or document library were custom generated by the user? I'm essentially trying to recreate SharePoint's front end in my app, and I want to add ...
0
votes
1answer
56 views

Invalid request while renaming sub folder

When I'm trying to rename sub floder, I'm getting issue mention below: "{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid ...
1
vote
0answers
28 views

Are there any reasons not to enable AJAX on a web part?

What are the potential drawbacks one would face when Asynchronous Update or Load are enabled for a web part? (SharePoint 2013) For example, if I use jQuery to make my lists look nice or add some ...
1
vote
1answer
265 views

how to filter - with rest Api by name column?

I have used this query: _spPageContextInfo.webAbsoluteUrl +"/_api/web/lists(guid'"+guidList+"/items?$select=ID,Title,carNumberIfActive,fullName/Id&$expand=fullName/Id?$filter=fullName/Id eq ‘name'...
1
vote
1answer
196 views

displaying ajax query results in usable format

I'm trying to run an Ajax fetch which is apparently successful. What I'm unable to figure out is how to pull the individual field data to separate and use. I can display it all with a data.d.results ...
0
votes
1answer
276 views

Unable to Query list's items using Rest API + CAML. Error “One or more field types are not installed properly…”

I want to query my custom list using REST API + CAML. And I have to use POST request to be able to get the managed metadata values (mainly Label), so I tried the below Ajax request: var body = { ...
1
vote
1answer
254 views

Get list items ids using rest api and integrated to like functionality (id value is not static)

Thanks for this article Enable like function from catalog page via javascript object model - improve this? is very useful and its working on my page, but i need your help, i am calling rest api ...
0
votes
1answer
110 views

Getting assign to by rest

I want to use ajax with rest api in order to get workflow tasks of a user. I use this: _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists/getByTitle('Workflow%20Tasks')/items?$filter=WorkflowName ...
0
votes
1answer
638 views

Sharepoint Online Excel Web Access web part refresh

Ok i have a sharepoint list with archive data about user performance (helpdesk environment). A flow runs when an item is added to the archive list which also adds the item to an excel document. I then ...
1
vote
1answer
20 views

fetching columns from assetLibrary

I have a assetLibrary , which consist of videos. I have a custom field called Description. `${rootUrl}('Vidz')/items?$select=Description&$top=2` this is the url i am passing via ajax call ,but i ...
0
votes
1answer
671 views

JSOM Break SharePoint List Item Permission

I wrote the following code to break list item permission. Code works fine other than a small issue. var user; function breakItemPermission(itemID) { //Get the current context var context = ...
0
votes
1answer
57 views

IE8 doesn't work

I'm using Ajax call for API in Sharepoint 2010. I don't have that much Access to edit master page. I also use the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:/...
1
vote
1answer
284 views

Adding a file to list item using ajax

For adding attachment via ajax I used this code from https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest : and added "for" and iffy function to make it ...
1
vote
2answers
202 views

Connected Visual Webpart - RegisterAsyncPostBackControl is not working?

I have two visual webparts connected. Provider webpart has user control (button) that should trigger update on the Consumer webpart. I do see that RegisterAsyncPostBackControl is called and control ...
0
votes
1answer
3k views

Get data from multiple lists using REST API

My requirement is: To pass listnames as an array to a method and concatenate the result after each success. The problem is I'm not able to concatenate the result from the previous ajax call ...
0
votes
1answer
198 views

IE 8 Doesn't work for my AJAX

I have AJAX code for my API. Chrome is OK, but IE is not working. When I changed the document mode of IE 8 to IE 10/Edge, it worked. NB: We use IE 11, but the default Document mode is IE 8. How can ...
0
votes
3answers
626 views

External list using REST API doesn't work

I just tried to call the Rest API using Ajax, but the server redirects me multiple times to authenticate. Finally, I get an error from the server with both a different domain and same domain name that ...
0
votes
1answer
438 views

Sharepoint REST A node of type 'EndOfInput' error when using NodeJS

I'm using a NodeJS express server as middleware for an iOS app in order to store data in a Sharepoint list. The iOS app makes a post request with the payload to a NodeJS server, which then ...

1
2 3 4 5
7