Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

17
votes
0answers
205 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 ...
10
votes
0answers
606 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 /...
8
votes
0answers
3k 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 ...
6
votes
0answers
77 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 ...
6
votes
0answers
391 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 ...
6
votes
0answers
1k 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 ...
4
votes
0answers
312 views

Print Files through SPFx/JS?

I would like to build a button which would send a batch of files to the printer when clicked (It can prompt the user. Doesn't need to go to the printer without approval). The files would exist in a ...
4
votes
0answers
616 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 ...
4
votes
0answers
562 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....
3
votes
0answers
160 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 ...
3
votes
0answers
55 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 ...
3
votes
0answers
27 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 ...
3
votes
0answers
48 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, ...
3
votes
0answers
233 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 ...
3
votes
0answers
526 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 ...
3
votes
0answers
45 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 ...
3
votes
0answers
549 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 ...
3
votes
0answers
121 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 ...
3
votes
0answers
439 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 ...
3
votes
0answers
395 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 ...
3
votes
0answers
100 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 ...
3
votes
0answers
634 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-...
3
votes
0answers
258 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 ...
3
votes
0answers
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 ...
3
votes
0answers
1k views

CSR: RegisterModuleInit without hardcoded JS filename?

Always looking to make CSR development easier... This the typical CSR programming pattern: We hardcode the filename inside the CSR file SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", ...
3
votes
0answers
480 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
3
votes
0answers
608 views

Sharepoint Authentication via REST API

I would like to connect to Sharepoint via REST API and Javascript. Based on readings I've done, first you need to have Security Token, then you use this Security Token to get FedAuth cookies, ...
3
votes
0answers
6k 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 ...
3
votes
0answers
251 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
3
votes
0answers
288 views

How to dynamically change the drawing path in Visio Web Access Web Part

I am wondering if there's any way to dynamically change the drawing shown by a visio web access web part. I have multiple drawings I want to show on a page based on what users click on the page. Any ...
3
votes
0answers
332 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
2
votes
0answers
20 views

Custom validation for people editor control

How to add custom validation for in asp.net if the user adds more than one username an error message must appear that he can only add one user. Thanks Regard.
2
votes
0answers
35 views

Update a library field when uploading a file using javascript

I am using a spfx webpart to upload a file and modified a column value associated tothat file. The code below works and stop working without any reason and i can modify only the title field with it. I ...
2
votes
0answers
24 views

permissionKind returns void in React

I have a search function that returns all list items including their parent link based on their content type, tenant-wide. Every list item comes from a specific subsite and I want to split the ...
2
votes
0answers
23 views

Displaying Image on SharePoint page from another SharePoint site (Of different Farm)

We have two different SharePoint server on different farm. We want to take images from one SharePoint site library and display it on another site page. We have given URL of images on page but it is ...
2
votes
0answers
66 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 ...
2
votes
0answers
31 views

Display the meta data of a page on the page itself

I want to display the page metadata (e.g status) of an aspx-page on the site itself. The sites are located in the default site pages library. library: Name:page1 Status:draft Name:page2 Status: ...
2
votes
0answers
32 views

retrieve Date and time filed value from one list and assign it to another list field “share point online”

so far i have retrieved the values and assigned them from "List A" to "List B" with same column names, 1) but date and time column called "End date and Time" needs to be split in to date and time ...
2
votes
0answers
150 views

error starting sp2010 workflow in sharepoint Online using javascript

I am trying to start a sharepoint 2010 style workflow which is configured on a list in sharepoint Online. I can't figure out where my problem is - each time I try to start the workflow with code, an ...
2
votes
0answers
100 views

JavaScript. Use Outlook online API from SharePoint online page without double user authorization

Is there any way to get user's events from Outlook online with JS from SharePoint online page without user re-authorization? What API can be used? User is already authorized on SharePoint Online, is ...
2
votes
0answers
212 views

View Last Published Version

I am trying to create a document library, which has a default view of the most recently published major version. If anyone checks-out a document to create a draft, I want other editors to be able to ...
2
votes
0answers
83 views

Key Filters fields which contain Managed metadata columns will float out of the layout if i move the mouse over one of the managed metadata fields

I am working on an enterprise wiki site collection inside sharepoint farm 2013 on-premises. now i enable the metadata navigation and filtering site feature, and i added 5 managed metadata site columns....
2
votes
0answers
38 views

SharePoint add-in won't create subsites upon button click

I have recently created a add-in for SharePoint online that will allow me to make a subsite. My written code doesn't show any errors, but it seems like it won't execute after a button click. <...
2
votes
0answers
26 views

When two client context scripts collide

Got a publishing page with two custom sections using javascript. the first is defined on the master page and filling some dropdowns in the left navigation bar the 2nd is defined on the page layout ...
2
votes
0answers
21 views

Parent-Child Indexes

I have two (2) lists that I've connected by an "Control ID" field, using the Web Part connection - the thing is, when I update the Child list [using "New Item"], the Parent "Control ID" value does NOT ...
2
votes
0answers
124 views

Accordion h2 open by link

using code from this site i have added accordion to SharePoint page. Now i'm try to open certain part of accordion by link from external page. I guess it should be done with hash but unfortunately ...
2
votes
0answers
36 views

SharePoint Survey Countdown and Click Next

We have an OOB SharePoint Survey that asks a question and if the user doesn't answer in 20 seconds, we want the survey to advance to the next question. We have a Script Editor snippet.. and if we ...
2
votes
0answers
688 views

SP.Utilities.Utility.SendEmail send as plain text

I'm using the SendEmail JavaScript utility and it's working except that I'm getting the email as HTML instead of plain text (which is what I need to process the body correctly for another service). I'...
2
votes
0answers
74 views

Display Modifications Each Time an Item is Updated

Not sure if this can be accomplished, but I want to try. Objective: When an item is modified SharePoint keeps track of the modification date, time, and person who modified the item. You can see ...
2
votes
0answers
18 views

How does one search a site collection for code embedded in web parts?

When refactoring you have to search your code base to see what areas may be impacted by a changing api. Code that is maintained in .js files and checked into source control can easily be searched. ...