Questions tagged [ajax]

An acronym for Asynchronous JavaScript and XML

Filter by
Sorted by
Tagged with
18
votes
3answers
26k views

JavaScript: How to reuse the "Working on it..." pop in

Sharepoint 2013: In have custom JavaScript code that makes Ajax calls. While loading I'd like to show Sharepoint's loading pop in: That is the one that greys out the underlying page and centers a ...
13
votes
4answers
11k views

Can't upload a non-text file to SharePoint App via REST API

I am using the following REST code to add a file as an attachment to a SharePoint 2013 list item. <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <SharePoint:ScriptLink ...
12
votes
4answers
23k views

SharePoint REST API call with more than 500 rows

I have an AJAX call querying the SharePoint REST API which will return more than 500 rows: $.ajax( { url: _spPageContextInfo.webAbsoluteUrl + "/_api/search/query?querytext='...
10
votes
2answers
3k views

Use SharePoint 2013 "Working on it..." during ajax call

I'm trying to use the SharePoint 2013 "Working on it..." during ajax call. This is the code: function ShowWaitDialog() { SP.UI.ModalDialog.showWaitScreenWithNoClose(SP.Res.dialogLoading15); } ...
10
votes
3answers
795 views

Verify SharePoint user in ajax request

Consider the following: A logged-in user visits a publishing page in a SharePoint Online environment. The page loads data from a service running on another server using an ajax request. In this ...
8
votes
3answers
4k views

How to asynchronously load and refresh a Visual Web Part?

We have developed a Visual Web Part for Sharepoint 2010 with Visual Studio 2010 (Visual Web Part project template). The web part loads some stuff and shows a list of items. It takes some seconds to ...
8
votes
1answer
2k views

Ajax Calendar Extender Position is not working in SharePoint Webpart

I am using Ajax Calendar Extender, but it is not pop up next to textbox, it is appearing int the middle of the page. Here is the code: <asp:TextBox ID="dtEnginerring" runat="server" ToolTip="...
7
votes
2answers
25k views

Creating Folder using REST and JavaScript

I'm trying to create a Folder in a SharePoint Image library. I found an answer here but I can't seem to get it to work var web = 'my relative path to the current web'; var lib = 'name of the image ...
7
votes
2answers
18k views

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

I am trying to Load list items in lazy load like Facebook. I have a grid that loads data from a list, and that list may have up to 5000 items and to load all those Items in grid it takes a lot of ...
7
votes
1answer
5k views

Fetch list of sites in site collection into jQuery

Is there a way to get the list of sites in the current site collection into jQuery as an array or other data structure? Thanks.
6
votes
1answer
50k views

SharePoint 2013 REST api to update list item- Uncaught ReferenceError: etag is not defined

I try to update my sharepoint list using REST api. But following code throws exception in browser "Uncaught ReferenceError: etag is not defined " Can someone help to resolve this issue? // update an ...
6
votes
1answer
803 views

How to load the list items in a GridView when scrolled C#

How to develop a VisualWebPart that loads list items on demand when scrolling the GridView, because I have a list with more than 10000 items and performance is key for this application. Description: ...
5
votes
1answer
17k views

Call WebMethod from JS in Visual web Part

I have ASP.NET web app that call some WebMethod from javascipt and fills textboxes. This is not all code, just example codesnippet function dataApp(text) { var loc = window.location.href; $....
5
votes
1answer
7k views

update sharepoint list using jQuery and ajax

I want to insert the value of html forms fields in SharePoint list using ajax (jQuery) Can someone point me in the right direction. Thanks in advance.
5
votes
1answer
2k views

SharePoint 2010 - Using REST to validate unique list item

I'm attempting to validate that a duplicate combination of staff (person/group field) + parent ID (lookup field) does not already exist in a list. Below you can see that I've added an ajax call to the ...
5
votes
2answers
3k views

Sharepoint 2010 Webpart Ajax not working

I have a custom webpart within Sharepoint and am trying to apply some ajax to the webpart. The same code works within a .net web application but not within a sharepoint web part. The code from the ....
5
votes
0answers
1k views

Post JSON ajax request with cors not working in IE10/Edge [closed]

Background:- I created a WCF service hosted in my local system IIS. Service exposes GET/POST method and cross domain enabled and can be accessed using https too. To make it accessible, self signed ...
4
votes
2answers
1k views

Is AJAX Built-in in SharePoint-Online ( SharePoint-Hosted Apps )?

As the title says, can I create a SharePoint-Hosted App and make Ajax calls right away? or do I have to import an ajax library or something like that?
4
votes
2answers
3k views

AJAX Pass variable to successhandler

Considering this sample code, how can it be changed so that it makes the 'something' variable available in the succeshandler function? var url = _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists"; ...
4
votes
1answer
6k views

AJAX/Rest only returning 100 items instead of full list

On an onchange event on a select box (filtered lookup column where the value is the item ID) i make an AJAX call to auto fill certain fields on a form. This works great except for it only returns 100 ...
4
votes
3answers
3k views

I'm trying to understang how AJAX and Sharepoint play together

I'm about to embark on a project whose goal is to take a Sharepoint wiki of documentation, and add an index as the left nav (right now, there's only search). As users click on an index item, the right ...
4
votes
2answers
6k views

Help with getting the value of a look up field

Currently, I am using an ajax request to access the list items. The fields that are not lookups come as expected but the lookup fields come across as an ID of the object that corresponds to its ...
4
votes
3answers
4k views

Loader Image on Synchronous call - Rest Api SharePoint

Stuck with "Loader" while deleting items. I have a set of items to delete and need to display a loader image while deleting. But, for some reason, i'm not able to solve this. I have came across ...
4
votes
1answer
2k views

Copying attachments using JavaScript (JSOM or REST)

I've been able to copy documents in document libraries using the "CopyTo" method: https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FileCopyTo I'm not understanding how I can apply ...
3
votes
1answer
704 views

Delete List Item with Ajax

I've been trying a few options out, but I'm finding good SharePoint AJAX guides to either not exist or be hard to find. Very simple, I am rendering list items with a repeater, and I want to be able ...
3
votes
2answers
15k views

Getting this error: An entry without a type name was found, but no expected type was specified

I am new to sharepoint.I am getting below error on ajax call i dont know where it is occuring. "{\"error\":{\"code\":\"-1, Microsoft.SharePoint.Client.InvalidClientQueryException\",\"message\":{\"lang\...
3
votes
5answers
591 views

Proxy page for Office 365

I am working on an Office 365 (SharePoint Online) website, and I am looking for a way to retrieve data (xml, json) from remote sites that don't necessarily support JSON-P or CORS. I could use an XML ...
3
votes
1answer
4k views

AssignedTo Column multi users via REST-API

Is it possible to set (Update/Create) 2 users to the AssignedTo column in SharePoint Online? I am using REST-API (JS). When I put one user with: AssignedTo "- 1; #USER@company.com" it works, but ...
3
votes
2answers
1k views

ScriptManager ServiceReference in SharePoint

I have always used jQuery.ajax to retrieve data from listdata.svc or lists.asmx in SharePoint and from some custom web services. Now I will try Microsoft Ajax Library and especially ServiceReference ...
3
votes
2answers
1k views

Hide a specific list from 'View All Site Content' using JSOM/CSOM?

I see you can make a list hidden by using SharePoint Designer (http://www.sharepointdiary.com/2013/06/how-to-hide-list-or-library-in-sharepoint.html) which I am not interested in. It is okay if the ...
3
votes
2answers
2k views

UpdateListItems won't let you reset field value to empty?

I've recently discovered that the Lists.asmx ignores your attempts to reset a field's value to empty string or null with Lists.UpdateListItems. Not a very well documented limitation discovered by ...
3
votes
1answer
6k views

REST Add List Item of Custom Content Type

In my SharePoint add-in, I have already utilized the REST call for creating a new list item: $.ajax({ url: "../_api/web/lists/getbytitle('Example List')/items", method: "POST", ...
3
votes
1answer
2k views

Get distinct values via mechanism used when clicking "Show Filter Choices" on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
3
votes
2answers
5k views

UpdatePanel with SharePoint 2010 web part

UPDATE protected override void CreateChildControls() { if (!this._error) { try { base.CreateChildControls(); ...
3
votes
4answers
508 views

Why doesn't jQuery execute in a DataViewWebPart with asynchronous load enabled?

The jQuery scripts I have in a DVWP do not get executed when I enable Asychronous Load in the Ajax Options of the DVWP. They do execute when I disable Asychronous Load though. Any thoughts on this? A ...
3
votes
5answers
10k views

Submitting input from HTML Form to a SharePoint list without using Infopath

I created a blank form on a HTML webpage through my Sharepoint site called http://.../testform.html. <form> <input type='text' id='name'> <input type='submit' id='submitdata' ...
3
votes
2answers
552 views

how to verify if the current user is in a specific group before the page render with jslink on Sharepoint 2013 365

I get this solution, but I have a need of turn some fields read-only but a function of verifying executes after all functions and do not work correctly, any idea about what I can do? function ...
3
votes
1answer
218 views

AJAX get for this weeks birthdays

Greetings fellow sharepoint warriors. I am trying to understand the way all the filtering goes and I've stumbled upon a problem. I would like to get items from list where birthday falls in current ...
3
votes
1answer
2k views

sharepoint 2010 get value of choice field through api call

I have a sharepoint list ImageList, i have a column which stores its type The column name is ImageType the choices are "profile pic","thumbnail" etc i want to fetch these choice values for this ...
3
votes
1answer
2k views

Javascript/Ajax errors on custom master page

I have a custom master page using a few JS utilities like jQuery and skel.js that has been experiencing some errors whenever the page loads. The errors are transparent to the user, but show up in dev ...
3
votes
1answer
3k views

/_api/SP.Utilities.Utility.SendEmail email is sent, but it does not arrive

I've been trying to send an email over REST using /_api/SP.Utilities.Utility.SendEmai, but seems like the emails just never arrive. Current setup SharePoint Online I send emails to myself and to ...
3
votes
2answers
1k views

AJAX Request not firing at Document.Ready

Had a question regarding an AJAX request I'm making via jQuery in my SP site page template. The code in question: //writes CSS classes to body script based on explicitly checked group membership ...
3
votes
1answer
3k views

How to properly cache, validate, refresh Access Tokens?

I'm a complete newbie to SharePoint Provider-Hosted Solutions and their authentication logic. My App is an ASP MVC Solution. I run many AJAX-Calls from Client-Scripts to my Controller to interact with ...
3
votes
2answers
818 views

InfoPath Pop-Up Window

I have a custom Web Part that displays information in an ASP.NET ListView. Upon clicking an item, I need to pop up an InfoPath form via AJAX to edit the item without leaving the page. The ...
3
votes
1answer
1k views

Filter sharepoint list using multi line text field

I'm trying to filter a sharepoint list using ajax api. So one of the filtered field is Multi line text field (FieldType.Note) , after performing request it throws an error telleing that the field ...
3
votes
1answer
306 views

Adding Controls to a Bing Map Webpart for SP 2010

I am using this WebPart to display Bing Maps, I did lots of research to find out, how can I put controls on it as one shown in picture in link but didn;t find any hint except AJAX might help, can ...
2
votes
4answers
13k views

Custom JSLINK rendering template - how do you get ajax paging working?

So I followed this post to implement paging in my custom JSLINK rendering template, and got that working great. The only downside to it is that the paging actions are full page post-backs whereas on ...
2
votes
3answers
39k views

How to get list items using Ajax and rest services

Please let me know which "query" to be used...i just copied a sample code from net... please guide me as I am new to ajax and sharepoint function getListItems(url, listname, query, complete, failure) ...
2
votes
3answers
4k views

Not able to access sharepoint list using rest api

This is my code function getListItem(url, listname, id, complete, failure) { // Getting our list items $.ajax({ url: url + "/_api/lists/getbytitle('"+ listname +"')/items", ...
2
votes
3answers
2k views

Problem with SPGridView and SPGridViewRow.FindControl

In a SharePoint webpart I am displaying an SPGridView. The SPGridView control is inside an Ajax updatepanel and is bound to a datatable in the code. The columns for the gridview are created mostly as ...

1
2 3 4 5
7