Questions tagged [javascript]

Javascript is a dynamic computer programming language, most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.

1,488 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17 votes
0 answers
266 views

Replacing SOD with fetch (handling JS library dependencies - *in the future*)

Anticipating a future, I am experimenting with User Custom Actions in the new Document Library View Microsoft has so kindly provided to the First Release Office365 tenants. Since there is almost ...
Danny '365CSI' Engelman's user avatar
11 votes
1 answer
4k views

How to stop a SharePoint workflow using JSOM

Let me preface by saying that I'm a relative newbie to this SharePoint stuff and am still fumbling my way around a bit learning from code examples where necessary. That being said, I have no issue ...
Scott Cochrane's user avatar
11 votes
1 answer
412 views

socialManager.isFollowed(socialActor) only returning 0 or false, but never true

Any ideas why I'm only getting 0 or false, but never true for result.get_value()? // Set IsFollowed correctly. var clientContext = SP.ClientContext.get_current(); var socialManager = new SP.Social....
Ben Weeks's user avatar
  • 111
10 votes
1 answer
704 views

Bundle SharePoint JavaScript files inside SharePoint hosted app

We have a SharePoint hosted app. This app require some scripts from SharePoint; MicrosoftAjax.js, init.js, sp.runtime.js, sp.js, sp.taxonomy.js and sp.workflowservices.js. We load all these from /...
eirikb's user avatar
  • 7,405
7 votes
2 answers
6k views

How to authenticate user in SharePoint Online using rest api

I have a website on SharePoint Online and a website on SharePoint On-premise. From my On-premise website i want to create a new list on my SharePoint Online site. To authenticate I used the following ...
JohnSP's user avatar
  • 71
6 votes
1 answer
179 views

SharePoint 2010 list Item Query

We have a big list in SharePoint 2010. I'm gonna query SharePoint 2010 list item in the web part based on country. I used CAML and JS. I have got errors in different browser" Internet explorer says ...
Sara's user avatar
  • 897
6 votes
0 answers
86 views

SharePoint sometimes adds script in page without any reason

I have this weird problem on one of our customer's SharePoint (2010): sometimes, on different pages, the page came out broken, with a bunch of HTML and scripts inside the normal page. I started ...
Alessandro Ghizzardi's user avatar
6 votes
0 answers
551 views

SP's JavaScript function to create pagination

SharePoint 2013 here. I need to create a pagination of results I get from an external web service. I want to use the look and feel of SharePoints pagination: Ideally I could call SharePoint's ...
Juergen Riemer's user avatar
6 votes
0 answers
2k views

'Permission denied' javascript error on modal window opening in IE8

While opening any modal window (NewForm, EditForm, custom or OOTB) on a SharePoint list in Internet Explorer I get few SCRIPT70: Permission denied errors. This causes problem with saving the ...
radekskl's user avatar
6 votes
1 answer
2k views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
dzookatz's user avatar
  • 516
6 votes
1 answer
4k views

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
lazoDev's user avatar
  • 1,806
5 votes
2 answers
5k views

How can I populate a dropdown with a SP list?

I have a SP List with data that I need to be in a dropdown list. I also need these to have specific classes. I'm trying something like the following but having no luck: $().SPServices({ ...
Stacker's user avatar
  • 55
5 votes
2 answers
1k views

REST API ItemCount on oData BCS List

I have a list generated from a BCS oData provider and I am attempting to get the number of items in the list so I can generate a $top on my request rather than bring back only the 100 item generic ...
Andrew Tobin's user avatar
4 votes
1 answer
1k views

Get SubFolders using Sharepoint REST API and show them in HTML DIV

I want to retrieve Subfolders using SP REST API and check if there is any created folder and If it exists, display HTML content like: <label>SubFolder Title</label> for each SubFolder. All ...
KmDroid's user avatar
  • 405
4 votes
0 answers
870 views

Sharepoint, Chart.JS and multiple charts not working

I'm relatively new to Sharepoint and am having a rather annoying issue. I am using Sharepoint 2013 and I am creating 3 donut charts all to be displayed on the same page, using chart.js. I have three ...
Fiona's user avatar
  • 41
4 votes
1 answer
3k views

401 (Unauthorized) in Google Chrome

When I Get the document list from SharePoint site I get this error "401 (Unauthorized)" only in Google Chrome, but in IE it works. This is my code function GetListItems() { var siteURL = "http://...
Admin's user avatar
  • 900
4 votes
0 answers
690 views

SP.WebProxy.invoke Alternative

I'm working on a SharePoint 2013 on premises Hosted App. The app needs to get data from an external REST endpoint from a web service on another computer. I've managed to get in Javascript the SP....
Ian Fleet's user avatar
4 votes
1 answer
544 views

How to call external ADFS secured WCF Service within Sharepoint via Javascript in an ADFS environment?

Previously on our little Sharepoint environment: We used integrated windows authentication for everything. On some of our sharepoint sites we integrated some custom javascript application logic that ...
hoetz's user avatar
  • 101
4 votes
1 answer
937 views

SharePoint Workflow Subscription Service failed

I have one requirement to start the SP workflow through JavaScript. For this, I have wrote some lines of code to start the workflow. But I am getting a Subscription failed error due to undefined ...
MAC's user avatar
  • 395
4 votes
0 answers
10k views

ULS logs filling up with Error: Failed to get document content data

Our Sharepoint farm's homepage constantly generates these "High" log items, making other debugging difficult. As far as I can tell, it doesn't acutally cause any problems. Error: High - Database ...
Aaron's user avatar
  • 250
4 votes
1 answer
2k views

how to by pass multiple claim authentication login page in sharepoint 2013?

My Requirement is I have SharePoint Server 2013.Now I just added two AD FS Server 3.0 and configured to SharePoint site http://spsxyz with Claim based authentication. An example of My Server Setup: ...
karthi N's user avatar
4 votes
3 answers
2k views

Add showWaitScreenWithNoClose to SPServices GetListItems

With a button on page which calls the function createListItems() which is added to the page as a link in a CEWP. The function takes 10-25 seconds to complete (get items from one list and add them to ...
Greg's user avatar
  • 125
3 votes
1 answer
2k views

The maximum number of bytes allowed to be read from the stream has > been exceeded

I'm trying to create a list item through REST api, but the multitext field contains content larger than 1mb and I'm getting this error: "The maximum number of bytes allowed to be read from the ...
Batman's user avatar
  • 1,458
3 votes
0 answers
303 views

Another "load required sharepoint files" issue

I know there are many posts on the subject of dynamically loading SP files. I've tried so many of them, but none of them seem to work. As I was trying to solve an issue I realized I had to back up and ...
Rothrock's user avatar
  • 3,010
3 votes
0 answers
290 views

Add UserCustomAction (ECB) for a group of checked items

I've found many code examples online showing how to add a User Custom Action to ECB from JavaScript. Take this one, for example. I've adapted and used the code, and it successfully adds a menu item ...
zed's user avatar
  • 143
3 votes
0 answers
68 views

How to work with JSOM typed-objects

This is a stumbling block that I keep hitting over and over again. Any advice or tips would be very helpful. I prefer to use the SP REST api to accomplish all kinds of things on our site, but for ...
Rothrock's user avatar
  • 3,010
3 votes
1 answer
755 views

SharePoint 2010 JavaScript CSOM- Updating list item by id - Anonymous user - Access denied

I am using SharePoint 2010 JavaScript Client Side Object Model to create and update list items on a SharePoint Survey list. In my use case users are anonymous . New items are created properly (...
Martinx's user avatar
  • 31
3 votes
0 answers
36 views

Disable field when current user isn't line manager

I've been searching for a couple of hours now and not found anything useful or that fully answers my query. I have a new approval process for holidays but I need some assistance locking down the ...
mikeparkie's user avatar
3 votes
3 answers
2k views

Conditional formatting for SharePoint Online column.

I am working on a SharePoint Online 2016 site collection and need to add conditional formatting to a few drop down fields. The drop down options are: 1: Red, 2: Amber, 3: Green. I want the field in ...
Ron McArthur's user avatar
3 votes
1 answer
69 views

Inject javascript to a list without using third programs -Sharepoint online

I have a simple form like this: I want to know, how can I import some javascript function to that list?
Ledwing's user avatar
  • 465
3 votes
0 answers
71 views

Interact with SharePoint Web Part Programmatically from JavaScript

My colleague is attempting to write a SharePoint add-in that interacts with a web part in SharePoint. Specifically the project schedule add-in. We have all of the basic business logic implemented, ...
Jake Schoermer's user avatar
3 votes
0 answers
280 views

How to render sharepoint 2013 rest api data into a list/library view with javascript?

I am downloading data from a sharepoint 2013 library and custom list, using the rest API (with CAML query), and I get back JSON data. Is there a javascript library out there that can take that JSON ...
omega's user avatar
  • 2,160
3 votes
0 answers
1k views

Search the document library using rest api in Sharepoint including its content

I dont require sharepoint search answers.I require using JS/Json/Web service/rest api.If i type anything in search box in top nav it should go to another page and show the results.Is there any way to ...
Sz4's user avatar
  • 67
3 votes
1 answer
312 views

SharePoint 2013 : Calling function in javascript file from Ribbon button

I am trying to call a function in an external javascript file from SharePoint 2013 ribbon button. I have a Typescript file and i am using Webpack to transcompile it to javascript. When i try to call ...
Maddy's user avatar
  • 199
3 votes
0 answers
57 views

Build url of publishing page by lookup id

Got a list with a LookupField to Publishing Pages library pointing on "Title" and additional field "ID". I would like to create a hyperlink by CSOM / javascript without querying FileRef on pages ...
Celophysis's user avatar
3 votes
0 answers
836 views

How to split the form into tabs in sharepoint 2013

I am trying to split a SharePoint 2013 list form into multiple tabs. I have tried below code but it is throwing an error "Unable to get property 'substring' of undefined or null reference". PFB my ...
Dheeraj's user avatar
  • 463
3 votes
1 answer
844 views

Warning Pop-Up Window Before Saving

I do not know which way to turn. The scenario is that I have created a SharePoint List with a InfoPath form attached to the list. There are numerous individuals that will be touching the form per ...
SharePoint Lady's user avatar
3 votes
0 answers
186 views

Undefined error querying a sharepoint list

I have two lists CharitySlots and CharityBooking.CharityBooking has a lookup field into CharitySlots. CharitySlots has a Lookup (calculated field) to count the number of slots taken. I run an event ...
Mokone Tsiloane's user avatar
3 votes
1 answer
2k views

Using the sharepoint javascript library (sp.js)

I created a form with HTML and JS for which the ultimate aim is to store data in a SharePoint list when the Submit button is clicked. For some reason, the code does not work when I embed it inside an ...
Brian's user avatar
  • 253
3 votes
0 answers
553 views

Working with Discussions/Replies using REST update DiscussionLastUpdated

I'm following this thread which shows how to create a reply to a discussion using REST api. Basically -- created the reply at top level of list, get the reply parent folder, get the FileRef info about ...
Rothrock's user avatar
  • 3,010
3 votes
3 answers
86 views

get a value out of a function?

I am trying to get value out of java script function to a variable var isMember; IsCurrentUserMemberOfGroup("Team Management System Members", function (isCurrentUserInGroup) {...
HAJJAJ's user avatar
  • 275
3 votes
1 answer
79 views

Process memory usage is rising to 1.8GB - Is there a more efficient way to write?

I am reading the content of a file and writing it to a SharePoint external List(SQL). There is around 35000 lines in the file. I am receiving the error below in SharePoint and process memory usage is ...
Ken's user avatar
  • 31
3 votes
2 answers
272 views

How can I edit web part in SharePoint 2013 on premises

I have tried most of the suggestion I found on the searches and still can't edit the web part. I don't want to delete the entire web part as multiple users access the site daily. The problem is that ...
Bill's user avatar
  • 31
3 votes
0 answers
508 views

How do I add the approve/reject button to the DisplayForm.aspx on a SharePoint 2013 task?

Hi I am attempting to add the approve/reject button to the DisplayForm.aspx (and possibly other forms) on a SharePoint 2013 task. I have a custom SP 2013 workflow designed for streamlining an ...
Mr.Miller's user avatar
3 votes
0 answers
124 views

adding links to PictureLibrarySlideshowWebPart and opening it on the same tab/page

I'm using the code on page, <WebPartPages:PictureLibrarySlideshowWebPart adding links, for adding the link to the slideshow pic webpart but I'd like to open the link in the same tab/window. Is it ...
user62994's user avatar
3 votes
0 answers
918 views

How to enable cors on a different site collection?

I want to make a rest call to get web properties (i.e. /_api/web), for a different web application than the current. I have added the response headers Access-Control-Allow-Credentials : true Access-...
omega's user avatar
  • 2,160
3 votes
1 answer
252 views

New Item script does not apply after postback

I have a simple javascript code on a new item page, it limits the number of characters for a multi-line field. After I select someone in the people picker, the form does a quick postback and load, and ...
David Santana's user avatar
3 votes
0 answers
467 views

Uploading Large PDF Files in Sharepoint Library

I want to upload large PDF Files in a Sharepoint Library . I tried from normal code from GetFolderByServerRelativeUrl method and it is working fine , but taking too much time.(for ex. a PDF of size ...
Adarsh Gumashta's user avatar
3 votes
1 answer
2k 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 ...
Bourbia Brahim's user avatar
3 votes
0 answers
1k views

how to implement the lastest angular 2 version with sharepoint hosted add-ins

Hi I'm trying to implement angular 2 within a sharepoint hosted app, I followed the scot hillier's article Build a SharePoint Add-In with Angular2 and TypeScript but it's a little old and I'm having ...
Emmanuel Villegas's user avatar

1
2 3 4 5
30