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
0answers
4 views

Show Site Admin information on Access Denied page SharePoint 2013

I'm looking to add custom message on Access Denied page in SharePoint 2013 and need to add Site Admin information as each and every site's having different site owner, so message should come up with ...
0
votes
0answers
13 views

Show/Hide Form Field in SharePoint 2016 "when field names are simular" using JavaScript

I have a script that based on an exiting field choice it will show/hide field forms boxes. The issue is I have field names that are similar in name and they can not be changed. When I ask the form to ...
0
votes
1answer
29 views

Function wait for a loop before returning value in javascript

My function return value of an array before pushing value into array. private async getPPickerid(ppvalue,AssignedToIdArr):Promise<any> { return new Promise<any>((resolve, reject) => { ...
0
votes
1answer
14 views

Trying to grab the current search query value from Search Box input using Javascript (SharePoint 2013)

I have a SP Web Part search box on a number of pages and, in order to create a link that load a page with that search box auto-populated with the existing search, I've been using JS. I've managed to ...
0
votes
1answer
20 views

Adding Custom Description to FileLeafRef(Name) BuiltInField Error

I came across this post here and the OP said the solution had worked for them. Solution from the above post: function addOrUpdateDescriptionOfColumn(libraryName, columnName, description) { var ...
0
votes
1answer
15 views

How to establish a real time connection to a list item using SharePoint Rest API

On my SharePoint home page I have a notification element that is ajax'd from a list item from the same site collection. I would like the user to always (or as often as possible) see the latest ...
0
votes
1answer
18 views

Adding a new item in the SharePoint list with multiple fields

My objective is to add a new item in a SharePoint list (Form) using REST API. My current code is: function AddData() { var listName = "Form"; CreateListItemWithDetails(listName, ...
1
vote
1answer
21 views

Remove user from site group using PnP-SP in JavaScript

I'm trying to find a way to remove a user from a group using PnP-SP. My code is as follows: this.$pnp.sp.web.siteGroups.getById(this.selectedGroup.Id).users .remove(user) ....
0
votes
1answer
10 views

Video Should not Play every time when page loads and page reloads in a SharePoint page

In SharePoint default page I add script editor web-part and in this added below script <video width="100%" autoplay="false" controls="true" style="width: 100%;&...
1
vote
1answer
27 views

Where is the secret list of field types kept?

I was trying to update a property on an existing SharePoint site column using the REST API. I found some tutorials like this Stack exchange post or this blog. They both have a __metadata property for ...
0
votes
0answers
17 views

Enter on input field causing Edit Page view to open

Hello I have a SharePoint SPFx react webapp that I've developed. On one of my components I'm using this Material Table found here: https://material-table.com/#/docs/features/search My code looks like ...
0
votes
0answers
21 views

Popup set expiring date for a cookie

I have a javascript which is use to show a popup when a user go to a SharePoint page. With the code below the popup show up every time the use close the browser et come back to the page. I would like ...
1
vote
1answer
14 views

Get Current Folder URL using Client Context for JavaScript

I am currently trying to retrieve the current URL of a document library using JavaScript. My ultimate goal is to un-hide a web part when the user clicks a specific folder. Right now, My code so far: ...
0
votes
1answer
77 views

Checking if a list item combination already exists, and returning an alert using PreSaveAction function

I'm creating a script that will override submit form functionality when the save button is clicked. The goal is to validate user input by checking if a combination of columns already exists within a ...
0
votes
1answer
91 views

Get SharePoint URL using sp-pnp-js in SPFx

I have a SharePoint SPFx react webapp that I'm working on. I'm trying to get the SharePoint URL. For example: https://mysite.sharepoint.com/sites/sitename/SitePages/Home.aspx#/ So I want to get ...
0
votes
0answers
25 views

Collapse/Expanse multiline column in my sharepoint list 2013

I have tried few threads here to use the Java Script in a webpart to have a Collapse/Expanse multiline column in my sharepoint list 2013. Bu.t none of them worked. Can someone please help me? My line ...
0
votes
0answers
13 views

Setting document details when uploading to SharePoint Online

I need to be able to set certain column details when uploading documents to Sharepoint (mandatory fileds to be able to edit the files). async uploadFile(file) { let data = new FormData(); ...
0
votes
0answers
26 views

How to get a link preview

We are creating a feature in our SharePoint online classic site where users can share links to sites they find useful. In Yammer and Teams there is a preview that comes up when a user types/pastes in ...
0
votes
0answers
11 views

How to show column item having with same value in sharepoint list count as one in selectpicker dropdown with dynamic id

I am trying to build a function that will show repeated column item of sharepoint list in selectpicker dropdown having dynamic id . It shows repeated column value instead count as one. Below is the ...
0
votes
0answers
31 views

SharePoint Get list item with users/group permissions using Javascript

I have a SharePoint 2013 list with items that have unique permissions. Is there a way to retrieve an item along with the users/groups that have permissions to that item and what permissions they have ...
1
vote
1answer
29 views

I'm trying to run a javascript script through the script editor in sharepoint online, but nothing happens

In the script editor I have this code to disable some buttons: <script> document.getElementById(id="Status_c15b34c3-ce7d-490a-b133-3f4de8801b76_$DropDownChoice_Aprovado").disabled = ...
1
vote
1answer
8 views

Can I overload a URL to return multiple subfolders in a calculated column?

I have two images that are both located in my site assets folder and I want to show the two images based on when a source column returns "yes" or "no". I have a wrapped around a ...
0
votes
2answers
26 views

https://graph.microsoft.com/v1.0/users returns a 403 Authorization_RequestDenied

I have an SPFX application deployed on SharePoint online that requires to get the users of a SharePoint site collection. To do that I used the PNP Graph library using the JavaScript command graph....
0
votes
1answer
27 views

Apply a Custom Filter for a List View

So I came across the following post on Filter a list view using URL parameters, which is sort of what I was looking for but not at all at the same time. I have a custom DataTable on a SharePoint Web ...
0
votes
1answer
21 views

Copy attachments from list item to another list item

Case definition: i have item with attachments in list and i want to copy attachments to another list's item using web-forms and rest api probably I tried to use GetByTitle('')/id/AttachmentFiles, but ...
0
votes
0answers
12 views

SPFX - Injecting custom javascript at runtime from property pane field

How is it that libraries like StratusForms are able to provide property panes for users to write custom javascript on the fly at runtime and inject that into the page? I don't understand the ...
0
votes
0answers
15 views

Trying to upload the date type from excel to SharePoint list column

I am trying to upload date column value in SharePoint list column of "date and time" type. The below image of excel data: The "Date of Commissioning" value upload in SharePoint ...
0
votes
1answer
95 views

Cors Error when generating access token for SharePoint point online from a JavaScript application

Any help is much appreciated. I'm trying to save data from a html form to a list in SharePoint online. I'm using SharePoint REST API to add items to the list. Ajax call to generate access token is ...
0
votes
0answers
15 views

Need To Convert DOCX File To Latest To Manipulate XML on Client Side

My JavaScript-based web app uses the html-to-docx library file which produces a Word 2007 docx blob (zip archive), which is a compatibility mode version in today's Word browser and desktop ...
0
votes
2answers
36 views

SharePoint Online: Open up HTML files in browser

Before when I used SharePoint 2013, opening HTML files would open up in the browser and my JavaScript code works. Recently, my organization switched to SharePoint Online and I noticed the HTML files ...
0
votes
2answers
77 views

Javascript in SharePoint Online not working

I use the Modern Script Web Part to inject JavaScript into my site. I want to modify div elements by className with JavaScript. The script is running on my local PC but when I try to run it in ...
0
votes
0answers
12 views

I am trying update RequestId column in SharePoint list of multiple created item

I am trying to bulk upload the data from excel to SharePoint list on button click. The image is given below:- When we click on the "Insert" button. The data will save in the SharePoint list ...
0
votes
2answers
40 views

Update Sharepoint List Item with Javascript Client Side Object Model

For the past days I've been trying, with no success, to establish a connection to a sharepoint list (https://mywebsite.com/sites/concasbkcu/Lists/list_teste/AllItems.aspx) and update its items with ...
0
votes
0answers
14 views

Liking server file directory

I'm new to SharePoint and started building a page for my team. I am trying to link a Server Directory such as "file://server/serverdirectory/docs"(note: it's not mapped to any drive) --> ...
0
votes
0answers
18 views

How to convert CanvasContent1 html to normal

When I make a request for a specific sharepoint page, I get html in response, which only sharepoint understands. https://site.sharepoint.com/sites/portal/_api/web/lists/getByTitle('Site Pages')/items(...
0
votes
1answer
12 views

Trying to upload document in "Attachment" column of SharePoint list

I am trying to upload document in "Attachment" column of SharePoint list. I am able to upload the document but not view the document. The SharePoint list is given below image:- When I am ...
1
vote
1answer
15 views

Issues with links with url parameters in Sharepoint modern UI( I have to click link twice)

I'm using the modern script editor. What i'm experiencing is if i use the below <div><a href="/sites/Mysite/SitePages/People.aspx">People</a></div> it works But when ...
0
votes
0answers
6 views

trying to validate that a file was uploaded to sharepoint - fails with ECONNREFUSED 127.0.0.1:443

I have the following code that successfully uploads test.sspkg to my sharepoint app catalog. Now I'm trying to use sp-request to prove that it's actually there. But I'm getting an ECONNREFUSED error. ...
0
votes
2answers
25 views

AJAX Data From SharePoint List Not Carrying Over to Next Function

I have created fiddle with mock sample data that is formatted the same way as the AJAX response data. When I try to implement my script into a SharePoint script editor and debug it, it tells me that ...
0
votes
0answers
10 views

currentUser.get_Title() is not working for all users to update the list in Sharepoint 2019 On PremSite

I have a created a list for tracking users who have visited the SharePoint Landing Page. This list should contain visited users details like Name, E-Mail and visited time. But the problem here is, The ...
0
votes
0answers
30 views

Sharepoint column - Highlight if there is the same value somewhere else

I have a SharePoint library that contains different columns and files. One of this column has a number associated. Each number is unique but time to time, the same number can used for another file. If ...
0
votes
1answer
52 views

jQuery Datatable not loading - SPFX Application Customizer

I'm trying to migrate jQuery Datatable from On Prem 2013 to online, I'm gonna create SPFX application extension, where I insert the scripts in order, still datatable is undefined. $.fn.dataTable is ...
0
votes
1answer
30 views

.JS file opening blank in browser

javascript(.js) file opening blank in the browser, when changing name it's showing all content. ex - regular-method.js -> opens blank regular-method1.js - opens with all it's content
0
votes
1answer
26 views

How to subtract a year from sharepoint date using javascript

I have a date column (Date Time only) Display format for the column is standard I tried the below var te = new Date(ctx.CurrentItem.Due_x0020_Date); I get this output : Fri Mar 12 2021 00:00:00 GMT+...
0
votes
1answer
32 views

Identify if guest sharing is enabled in SPFx

I tried using context.pageContext.legacyPageContext.guestsEnabled, but it returns false when external sharing on the site is set to "Existing guests only" and works fine for "New and ...
1
vote
1answer
23 views

How can I get ID when I insert new items to list?

I'm currently using JSOM to insert new items to list. var clientContext = new SP.ClientContext(); var oWeb = clientContext.get_web(); var oList = oWeb.get_lists().getByTitle("request&...
0
votes
1answer
30 views

How to join the multi row value in single row of SharePoint list

I would like to submit the multiple line item value in single row of SharePoint list. The result of the actual submitted value in SharePoint list is shown below image:- If the column value is equal ...
0
votes
0answers
19 views

Filter link items from list using Page destination column and site Page name

I have a request from a client to use an link library (list) for multiple pages, the idea is to have one link library where you can put a name of a page destinaton, i.e.: Link Icon: "redfolder&...
0
votes
0answers
23 views

Error handler for gulp-spsync call is never reached

I am uploading and deploying sharepoint packages via gulp. Sometimes, it's possible that the app catalog folder doesn't exist, and so the upload will fail. I'd like to just make a note of the error ...
0
votes
0answers
19 views

How can one fetch values via JavaScript from a SharePoint list with columns that have values stored via term store

I have a jqGrid where 2 columns have values which come from the termstore. The values in the column "Mandant" and "Vertragspartner" are stored via term store management tool and ...

1
2 3 4 5
107