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.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

How to call graph API to read SP list items from SPFx in SP Online?

I'm new to graph API and trying to use graph API to read SP list items from a custom list using the current user's rights (not service account). But I'm getting an error. I have this so far: In the ...
0
votes
0answers
8 views

How to create an event handler to throw a javascript alert() when a document is uploaded to 2016 Sharepoint document library?

How to create an event handler to throw a JavaScript alert() when a document is uploaded to 2016 SharePoint document library? I would like the alert message to state the file name. This seems like it ...
0
votes
1answer
14 views

HTML showing up with inserted text via REST API

I am getting the value from a text field and then inserting the value into a SP list. The problem is that when I check the console the field shows HTML. var txtField = document.querySelector('#...
0
votes
0answers
15 views

How to add an alert box with Icon in SPFX

Is there any way to add Extra icon on the default alert Popup box? I have also used BootBox alert but getting error: Error: "$.fn.modal" is not defined; please double check you have ...
0
votes
1answer
31 views

JavaScript CRUD operations in Provider Hosted Apps SharePoint Online

I am new to Provider Hosted Apps and starting off with the basics. Was able to save the data to the list, However facing challenges with edit, update and delete. Scenario: Created a simple form with ...
0
votes
1answer
108 views

AddListItem is not populating the List in SP2013

I have a knowledge check in HTML form, so I cant inject into CEWP or SP pages. It needs to be JS, CSS, and HTML. How do I populate a list if someone completes a Knowledge Check? It will add the score, ...
0
votes
2answers
34 views

Unable to Access multidimensional array elements of SharePoint CAML query

The following code outputs a comma separated array for the var cats. The array has six items as the list "banner" has two columns and three rows of items. I can access the array items in the ...
1
vote
0answers
24 views

How to determine user logged in and session not expired in SharePoint using JavaScript

I created a clientside application for SharePoint using javascript and jquery. We use Rest API for CURD operation on SharePoint Data and config Idle Session Timeout for the inactive user. After a user ...
1
vote
2answers
18 views

Using javascript I need to highlight a row if it is within 14 days of becoming due via due date, and red it if is past due or today

So I have this code that I found here at Stack Exchange that lets me highlight rows based on date: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function () { ...
0
votes
1answer
21 views

Passing calculated value to become new item in SharePoint list

I've created a crossword game based on this: https://github.com/trutex/jCrossword. I added a script to score the game (1 point per correct answer). Goal: when the user has answered all the hints they ...
0
votes
1answer
13 views

OnClick the function behind it runs but values are not displayed in the form (webForms)

I am not sure why this is happening it is working alright on my other form which have almost similar code. Button <td> <asp:Button Text="Proceed" ...
1
vote
0answers
24 views

SharePoint 2019 javascript SP.MoveCopyUtil.copyFile not working across site collections

In SharePoint 2016, I was happily surprised to benefit new javascript functions available in SharePoint : SP.MoveCopyUtil.* to get out of the hell of copying files in SharePoint. The following peace ...
0
votes
0answers
15 views

Fetching User's profile thorugh Graph API into webpart in SPFX

How can we fetch a user profile photo through Graph API and display into Web part in SPFX? Here is my function to call Graph API to fetch Specific user's Profile Photo filtering through their Mail ...
1
vote
1answer
24 views

DevExpress Custom Store to get data from REST API

I'm trying to create a drop down menu using DexExpress in jQuery with SharePoint REST API. I get the values from the REST call in the console, but I'm having issues trying to display these values in ...
0
votes
2answers
29 views

How to add button to SharePoint 2013 ribbon using JavaScript

Is it possible to use JavaScript to dynamically add a custom button to the ribbon? I want to add a button next to the upload document button in a document library. Any ideas or code how to do that?
0
votes
1answer
21 views

What is the minimum permission needed for the client side people picker to work for a user

I have implemented client side people in SharePoint 2019 site in a custom form using plain HTML and jQuery. Requirement is to give user enough permission to use people picker but restrict from add/...
1
vote
1answer
22 views

Running an application setup script using content editor

Preface, I have absolutely no experience with SharePoint (we use 2016) and I've received tasking that requires me to set some things up. Basically, my org wants to set up a stress test application on ...
0
votes
0answers
12 views

develop an excel report

Trying to make a report builder page with some filters and export button. In this approach the button will run the query directly from the various list and fetch out the detail in the excel in desired ...
0
votes
1answer
27 views

Using Filter Query in Graph API to fetch the particular users

Current code: public render(): void { this.context.msGraphClientFactory .getClient() .then((graphclient:MSGraphClient): void=>{ graphclient .api('/users') .filter('Department eq IT') .get(...
1
vote
0answers
21 views

GraphAPI send invitation to external/guest user for a specific SharePoint site

Language: JavaScript - MSAL library Scope: GraphAPI Is there a way to send an invitation to an external user thorough GraphAPI that will be valid only for a specific site. Currently I am using the ...
0
votes
2answers
37 views

Adding space between radio buttons

is there any way we can add space between the choice fields (Radio Buttons)? For instance if I want to make space between Youth and Adult what would be the steps?
0
votes
0answers
22 views

How to get document library in webpart property using no javascript in spfx

I am trying to get document library in webpart property using no javascript in spfx. How can I retrieve in drop-down.
0
votes
2answers
25 views

How to filter list and Document library in java-script [closed]

How to filter the list and document library from SharePoint using base-type?
0
votes
0answers
6 views

How to store content of redirected page into a popup form

This is my Webpart in Sharepoint workbench Clicking on the Task-name , redirected to the new page with default pop-up Form This is my redirected page with default pop-up form Is there anyway to show ...
0
votes
1answer
38 views

Request next available item from sharepoint list with jquery

I have a sharepoint list with two columns, one with one time codes and the other one is yes/no Like this: CODE USED NGTHX–EVLRZ–GHTXD Yes RYKXB–EOMWD–FZUWL No DKTUN–YSCWP–PHKWM No So what I'm ...
0
votes
0answers
9 views

Cannot save FieldUserValue. Error: “Invalid data has been used to update the list item. The field you are trying to update may be read only.”

this is my code: var context = new SP.ClientContext.get_current(); var targetList = context.get_web().get_lists().getByTitle("reqLegales"); //my list context.load(targetList); var item = ...
0
votes
0answers
55 views

Get files and folders from a SharePoint Library to Popup container

I would like to show folder/files on Popup container, i am using api call to fetch the folders/files and it is not displayed on container anything wrong here. Under Test folder I have folders/files. I ...
0
votes
0answers
25 views

Import MS Power Automate approval pager to Sharepoint online

I have made a site and script that will ask user for credentials and then load iframe for approval page. But it doesnt work correctly. Login pop-up window shows on every page refresh and it shows ...
0
votes
0answers
18 views

Update SharePoint LikedBy column without changing approval status

I have a list where i've enabled ratings field, I'm using setLike.js to show and update the likes on list items. The problem I have though is the list also has "content approval" enabled. So ...
0
votes
0answers
13 views

I have a SP list A with lookup column from list B. I want the lookup from list A to auto-populate input text fields from B

$("select[title='Shipping POC']").change(function () { var shipPOCID = $(this).val(); var shipPOCID = getURLParameter("Shipping_x0020_POC"); console.log(...
0
votes
2answers
50 views

Conditional formatting help SharePoint 2016

I am trying to apply conditional formatting to my calculated field "Days" i would like for the following conditions to trigger the formatting. i cant seem to make it work. below is my code ...
0
votes
1answer
12 views

Custom JS Interfere with Workflow?

I have noticed once I added custom JS to my SharePoint page, one of my workflows stopped working (it sends email alerts). I checked it in Designer and it says no errors?
0
votes
0answers
14 views

Copy Files timing out

We are writing code to copy around 600+ files from one document library to another , However the request times out after 500+ files are copied. Read a few articles about timeout handling with no luck ...
0
votes
0answers
19 views

Modify my SharePoint Framework Extension to only run on the home page of the site + add a custom JS file

I am working on a SharePoint online modern team site, and I am following these steps to inject custom CSS inside my pages @ https://tahoeninjas.blog/2018/05/08/inject-custom-css-on-sharepoint-modern-...
1
vote
1answer
21 views

403 when making axios POST request

I have a feature that loads a map onto a page, and 5% of the time I'm hit with a 403 error and the map data doesn't load properly. I've had a very difficult time with triggering the error, but I was ...
0
votes
1answer
17 views

Hiding the Stop editing link when the QuickEdit grid is closed in SharePoint

I am trying to replicate the "Stop editing this list" link that is at the top of the page when in QuickEdit Mode. My link will be at the bottom. I want to the hide the when not in QuickEdit ...
0
votes
1answer
28 views

filter column with last 4 digits using restapi

We have a column where the values are stored as '1002859817' and the Field Type is single line of text. The end goal here is to filter the column based on the last 4 digits i.e. '9817' Tried the ...
0
votes
0answers
25 views

Where is the NewForm, DispForm, and EditForm on SP 2019?

Trying to find out where the New, Disp, and Edit form pages are on SP 2019. Migrating from 2016 to 2019 and we had some customized forms using JavaScript. The 2016 pages used CEWP to add the ...
0
votes
1answer
27 views

Batch Update for 16K Items failing

We are trying to copy contents from one column to the other , However we get request digest error after 6K Items. Below is the code $(document).ready(function () { $("#btnSubmit").click(...
0
votes
1answer
23 views

SP2013 Custom List - Date & Time Column

I have created a custom list on which both date and time needs to be captured on two specific fields. To comply with existing custom formatting on the new and edit forms, I need to re-size the three ...
0
votes
1answer
34 views

Copy Input Box to SharePoint input

Is it possible to get the value in the textbox value I created in Script Editor to copy over to Title? I would like for the text I type to automatically copy over to the Title box that is part of the ...
0
votes
0answers
14 views

How to check if user belongs to a sharepoint AD group nested within a SPO group using REST/Javascript only?

I need to know if a user belongs to a specific SPO group using REST/Javascript. If the user has been added individually I can but if the user has been added to that SPO group via an AD group I can't ...
0
votes
0answers
12 views

Custom List - Hide 'Settings' on Form Web Parts

I need to be able to hide the ‘Settings’ cog, from everyone other than the site Super Users, on the New & Edit forms of a specific Custom List. My Javascript skills aren’t great, but a colleague ...
1
vote
0answers
30 views

OData query to get a field values by column position in the list

So I want an OData query that allows me to get the field and its values by position in the viewable list. In the above picture, for example, I want the values in the "Title" column but that ...
0
votes
0answers
8 views

Download file from SP in custom web part without <a></a> tag

I have a custom web part it needs to download a file from SharePoint document lib. I was using the tag combined with the file path, but this seems to break SharePoint. Is there another way to do it? ...
1
vote
0answers
24 views

409 'Conflict' Changing ContentType property of Document Library

I have about 600 items in a document library. The library has 9 content types defined in it, which is part of a reorganization to take items out of folders and make it folderless. The library is a ...
1
vote
0answers
17 views

Sharepoint 2019 - modify search result item template to return Office URI Schemes

I am looking for a way to open word, excel, ppt files in a local client application. For any mysterious reasons that work in document libraries but not in search results. I know that it works if I ...
0
votes
0answers
8 views

Adding Dynamic value to the table data in sharepoint framework

I am adding dynamic data to the table through graph api call into the webpart except in the Assigned To table heading I want to fetch the value for Assigned To through another graph api call How can i ...
0
votes
1answer
34 views

Custom action button enable/disable

I want to enable or disable custom Action button on following condition. When user select list items in the list and if the user (created by) is particular user Group then I want to disable the Button....
0
votes
0answers
24 views

Link shown in SP.ModalWindow is opening in a new tab

I am opening in a modal window a link to 'Manage my alerts', so the users don't need to go to a list, to handle their alerts. However, when the alerts are displayed in the modal window, if user clicks ...

1
2 3 4 5
106