Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
6 views

Can I use libman with my SharePoint Add-In project?

I've noticed that libman is only available in Visual Studio 2017 asp.net projects. However, SharePoint Online Add-In projects are also web projects and use lots of javascript libraries. Is there any ...
0
votes
2answers
25 views

Why the AJAX function is only executed in the end?

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/OfertaParticulares/_api/web/folders('Dinamico')/...
0
votes
1answer
21 views

Displaying List Item in CEWP on another Page

I have a SharePoint with several calendars named for their store number, I also have a list named Store Addresses which has the store numbers and their addresses. I am trying to display the address ...
0
votes
2answers
15 views

Data from Sharepoint REST API is returning undefined

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/folders('Historico')/folders?$...
0
votes
1answer
24 views

Using deferred promise when retrieving share point list data

I am creating a SharePoint online application and I need to retrieve information from various lists. To do this I'm sure i need to use a deferred promise so as all the functions can execute. Below is ...
0
votes
1answer
39 views

I need to create a layout like the one attached in Javascript [on hold]

$.ajax({ url: "http://bc-net/Sandbox/juandev/_api/web/lists/GetByTitle('Qlinks')/items", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (...
0
votes
1answer
23 views

JS script only throws error when used in SharePoint in Internet Explorer 11

I'm experiencing this strange issue. I have a basic valid javascript app (Vue.js + Vuetify framework) which works fine in any browser (without SharePoint, so run from any hosted environment). Next I ...
2
votes
4answers
49 views

How do I change link/url for text “SharePoint” in the top bar

I am working with SPOnline and trying to see if there is a way to change link/url when users click on SharePoint in top bar. See below screenshot. I believe it has to be done at master page level, ...
1
vote
1answer
30 views

Show the SubFolders in DIV using Sharepoint REST API

I have this code bellow: jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/Folders('Historico')/Folders", method: "GET", ...
0
votes
0answers
9 views

Optimize Retrieval of Multiple Lists

The below code snipped retrieves all items within each list in a subsite. Then filters by list title so that only information from lists containing "RDTEN" or "procurement" in their title get parsed. ...
0
votes
1answer
43 views

Why is my loop not iterating?

I have a blog list (SP2016) which I am using to display news items. On the blog list I have a workflow which sets the Created by(Author) field to system account. for a better ux I am capturing the ...
0
votes
1answer
18 views

Call JavaScript dynamically on Visual Web Part

I currently have a visual web part that displays clocks from different time zones, using the jClocksGMT library as provided here in the .ascx file. However, instead of hardcoding the timezones I want ...
0
votes
1answer
20 views

REST 500 error on list item

I have a REST request pointing to a list in which I am getting the items. I am using the the _spPageContextInfo.webAbsoluteUrl +'/_api/' then tagging the path on the end. This list is in the same ...
0
votes
1answer
18 views

Rest API to display SharePoint list items on Webpage

I'm using the Rest API to pull in data from a SharePoint list and display the results on a webpage. How would I be able to target those two array items? All I'm receiving back in [object Object] [ ...
0
votes
2answers
26 views

SharePoint List Query fails with error “Request failed, cannot complete this action”

I'm trying to query a SharePoint list on my root site collection but keep getting the error "Request failed, cannot complete this action". I messed around with the CAML query below and have figured ...
1
vote
1answer
18 views

How to update SPO task list in case of below requirements

I am working with SharePoint online Task List for one of the implementations. Below is the screenshot of the same. I am using Below JS Snippet to highlight the tasks in Yellow for which the Due date ...
0
votes
1answer
29 views

Adding a Dynamic calculated field in SharePoint Edit Form View

I am looking to add a dynamic field in my Edit Form since calculated fields do not show on the Edit View mode. Using the Hillbilly format, I created a table... HTML <tr> &...
1
vote
1answer
38 views

Limit edit in SharePoint List to only 3 Items per user

I need to limit the possibility per user to be able to edit 3 drop down value items from the quick edit mode option in a SharePoint list(when pressing "edit this list" that is next to the new item ...
3
votes
1answer
42 views

SharePoint List to HTML Table to TableExport.js

I'm using the TableExport.js API and PNP.js to pull data from a SharePoint list and display it on a Webpage and then have the options to export it into a Excel/CSV/Txt file. Homepage: Shows the ...
0
votes
0answers
16 views

Create Page .aspx in a list using SP REST API [duplicate]

I've this code below: var fields = { "__metadata": { 'type': "SP.Data.PagesItem"}, "Title": "test" } jQuery.ajax({ url: "https://.../sites/intranet/jobs/_api/web/lists/GetByTitle('Pages')/...
4
votes
0answers
48 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 ...
0
votes
2answers
20 views

Redirect to Previous Page after Form submit

Looking to redirect to the Previous Page after a Sharepoint form submit. People will be coming to this form from different departments and want to redirect based on their previous page. I see the ?...
0
votes
1answer
27 views

Upload attachment to List Item using React & Axios (REST API)

Well the title pretty much sums it up. I've got a custom form outside of sharepoint that creates/updates/views items from a sharepoint list using Rest API (with accessToken). Now i need to be able ...
0
votes
1answer
47 views

Export sharepoint list items to excel by passing item ID as parameter using javascript

I have multiple filters on the page which gives me results, My objective is to provide an export link somewhere on the page which should have url with Id(s) as the parameter, thru which user can ...
1
vote
2answers
31 views

O365, I have a Column Named 'Status' to show Green/Red circle but I am struggling

This is from a List and on List setting there are two Columns that involves the problem I am facing. Status (absolute name = ColorStatus) NewCol2 Users will enter in either 0 or 1 in NewCol2 field ...
0
votes
1answer
23 views

Where to place JS link in DispForm.aspx

Whenever I place my js link: <script src="/sites/xxx/SiteAssets/js/xxx.js" type="text/javascript"></script> Under <asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="...
0
votes
0answers
31 views

World Clock Location in Ribbon

Hello, So the above top left world clock is how I have everything set up in SD Designer. The color is fine, I need the clock to be moved all the way to the right and condensend to the one below. ...
0
votes
1answer
38 views

Error in metadata type when I'm trying to POST

I have this code below: function insertuser(obj){ var listID = obj.getAttribute('data-listid'), itemID = obj.getAttribute('data-itemid'), URLID = obj.getAttribute('...
1
vote
0answers
30 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 ...
1
vote
2answers
52 views

Trying to Create a Javascript dropdown with Managed Metadata terms

I am trying to use JavaScript and REST to grab terms out of a Term Set and bind them to a Bootstrap select field in the NewForm.aspx for a list. Thus far I just cannot pull the terms and bind to ...
0
votes
1answer
16 views

Javascript - Getting only 10 items from list column

I have a custom code to get data from a second list, this list returns some columns, but this code is getting only 10 values even tho the list have a lot more than that. I got this code from a ...
0
votes
2answers
38 views

Retrieve a sharepoint list item based on current user

I am currently building a leave request app addin for share point using HTML and java script. I want to have each users leave days remaining days displayed on the form when they are submitting a leave ...
0
votes
2answers
28 views

Script Editor Web Part (SharePoint 2013)

Newbie so please don't beat me up. I'm trying to run a simple javascript function using the jquery library. I've tested it on jsbin and it runs. However when I go to my SharePoint 2013 page, ...
0
votes
1answer
18 views

Hide div or span based on user's permission

I'm using REST API to populate contents on a page. Each item has an Edit link to allow content provider to edit the text and image. Content Providers are members of 'CPGroup' SharePoint Group with ...
0
votes
1answer
38 views

How To: Filter A Query on All Lists Based on Title Contains

I have queried all of the lists within a subsite but need to filter based on criteria in the title. I then need to display the filtered list contents. Is this possible if the list contents are not ...
0
votes
0answers
28 views

How to make after row adding validation

First row is working fine but click on add row row is added cites is not cleared and based on state selection city is not bind in 2nd row. var categoryinfo= { "Andhra-Pradesh":{ "Vijayawada":[], "...
0
votes
0answers
16 views

Retrive storage metrics data with JavaScript on SharePoint 2013

Is there any possibility to retrive data which is in ../_layouts/15/storman.aspx ? The way which mentioned below is not what I need. I need to learn folders size, % of Parent and Last Modified dates. ...
0
votes
1answer
30 views

Custom refiner display template: Possible to change refiners' display names?

Does anyone know if it's possible to create a custom refiner display template that renders the refiner values differently to their native values? I have a managed property Manager act as a refiner: ...
0
votes
1answer
45 views

How to make status change

I was attaching fronted view and SharePoint designer view in screen please refer image and help me how to implement the code
0
votes
0answers
21 views

How to hide/show view columns in SharePoint list view

I am playing with Document Set in SharePoint where document set's documents takes default view. However, I dont want to show few columns (e.g. 'Status', 'Salary' etc.) in default view but want to ...
0
votes
2answers
30 views

Passing query string to Survey list newform.aspx

Is it possible to send query string to newform.aspx of the survey form so it's pre-populated? (I am using SP 2010) The question in survey list is created is ServiceTicketNumber and then renamed the ...
0
votes
1answer
47 views

Multilevel Cascading Dropdowns Sharepoint 365

I have three dropdowns 1-Company 2-Group 3-Partner I want to use multilevel cascading on 3rd dropdown as a combination of both (1 and 2 dropdown). How can it be done? Almost all the examples I found ...
0
votes
1answer
26 views

How to set the People picker column to current user by leveraging JS/JQ (not spservices)

For one of the implementations, I am using a basic SharePoint list form to add entries in a list, there is a workflow attached to it as well. On NewForm.aspx, I have a column called 'Requester' (...
1
vote
2answers
34 views

How to embed remote/dynamic JS in a page?

I have several pages and instead of including my JavaScript in each page and then updating/amending the script in each page which is time-consuming, I just want each page to pull the script from a ...
1
vote
2answers
26 views

Pause Event Handler Using Powershell

I am not sure if this is possible. I know there is a way to disable or delete an event handler using Powershell. But is there a way to pause an event handler using Powershell? I have three event ...
1
vote
0answers
49 views

JSOM - Load items with fields

I've got an issue when loading data with the jsom (JavaScript). I've included all fields, I want to load: this.context.load(this.items, 'Include(ID,DocIcon,LinkFilename,FileRef,FileLeafRef,Title,...
0
votes
2answers
37 views

Check if People picker has any value on document.ready of EditForm.aspx in jsom sharepoint 2013

I am trying to set a Person or Group field value only if it is null. I am checking this on document.ready() of EditForm.aspx of listItem, where If its null, then I want to set its value to currentUser ...
1
vote
1answer
31 views

Open dialog/modal from another modal (DispForm.aspx)

I have a code that opens any DispForm.aspx link into a modal dialog. The item has a link to another DispForm.aspx -- is it possible to open this on another modal? I tried inserting the following code ...
2
votes
2answers
45 views

Single Page application without Content Editor Web Part [closed]

Right now my sharepoint site consists of one page, which has only a web part placeholder containing a content editor web part that links to my Vue.JS app. So basically I've created some sort of SPA in ...
0
votes
1answer
24 views

Sharepoint Rest API Error 403

i have a sharepoint farm with two different web applications. When i'm trying to access the second web application with java script from a page of the first web application, i always get an http error ...