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
15 views

Select all checkboxes depending on parent checkbox in SharePoint server 2016 on premise

I have a document library in SharePoint 2016 on-prem. The document library has a content type with columns that the user needs to complete when the user uploads a document. Since you cannot edit the ...
0
votes
1answer
30 views

Tree-hierarchy for 3 sharepoint lists using the https://gijgo.com/tree .. any help please

I have the below 3 SharePoint lists, and using the REST APIs i am getting the data as follow:- 1- List named named "Department", here is the json for the items "value":[ {"...
1
vote
0answers
20 views

Fetching Form Data to Append to HTML Page

I have a SharePoint form with the following columns: Team (choice column), Week Of (Date & Time column), Offensive Report (multiple lines of text column), Defensive Report (multiple lines of text ...
3
votes
2answers
73 views

How to get the Alternative text for “Hyperlink or Picture” field Type in SharePoint online

I have a field in my SharePoint list of type Hyperlink. I want to format the list view so that all the items in it will display as bullet items. I am using JSLink and below is my code. I want the DOM ...
0
votes
1answer
17 views

Collect the latest Modified and Modified By info for each user that has contributed to a list. Javascript?

A customer has asked me to display a table that shows everyone who has modified a list and the most recent modification they each made. It would look like: Sally Modified 3 hours ago Jack Modified 4 ...
1
vote
1answer
14 views

Relative URL or using _spPageContextInfo

For some reason, relative URLs are not working OR I am using the wrong syntax. I have tried the following with no luck on my CEWP HTML page. <script src="/jslib/jquery351/jquery351.min.js&...
1
vote
1answer
26 views

SPServices is not working in one environment and working in one SharePoint environment/

We deployed solution in one SharePoint server, and uploaded the js file after solution deployed. we are getting the following errors on debugging JS. SCRIPT438: Object doesn't support property or ...
0
votes
0answers
23 views

Lock down page and have web part zones at certain points

Need help with a layout using custom CSS and JS. Want to lock down page and have web part zones at certain points I have a standard page that was blank. On this, I added some custom CSS and JS and ...
2
votes
2answers
40 views

Google Organization Chart from SharePoint list items

I created a Google Organization Chart on SharePoint using the answer from the following question on Stack Overflow. https://stackoverflow.com/questions/33796219/organization-chart-from-sharepoint-list-...
0
votes
1answer
22 views

SharePoint Page Title Does Not Change

So I have created a bunch of SharePoint site pages where the title is just the SiteName.aspx in the Web Browser's title bar. By default, the SharePoint title also appears in the top left of the ...
2
votes
2answers
33 views

Not able to insert data into TaskList In sharepoint Spfx

Using SP-Pnp-Js Library, I am not able to insert data from a webpart into the sharepoint Tasklist. private SubmitWorkflowForm(): void { var TaskNameVal = document.getElementById('taskName')['value']; ...
0
votes
1answer
29 views

Picture Slideshow Web Part image size too small if page contains multiple picture slidershow web parts on same page

I want to show full size picture in slideshow web part in SharePoint 2010. but SharePoint shows images from /_w folder of picture library which are not original and full size images. I have found very ...
2
votes
2answers
130 views

SharePoint Online JavaScript creates folder instead of document set

We have a SharePoint Online system with 4 custom new forms created with Html/JavaScript. These forms used to create document sets and worked very well for a year (the forms are for different document ...
0
votes
0answers
20 views

Copy documents from document library A to document library B

I have a requirement to develop a solution based on SPFx, namely, copy main versions of a documents from document library A to document library B. I have tested copyto (PnP.js) but it only copies the ...
0
votes
0answers
17 views

Restrict user from adding more than one entry a day in calendar list

I am quite new to SharePoint development and am facing an issue in creating a custom calendar list allowing only one entry per user per day with entry only for mode of work (i.e. from home/office etc)....
1
vote
1answer
21 views

Retrieving “CanvasContent1” in JSON format

I'm trying to build my knowledge of SharePoint Restful API so that we can ultimately script bulk updates to pages. Something I don't understand is why the "CanvasContent1" column is being ...
0
votes
1answer
31 views

Add SharePoint page name in a webpart

I've made a HTML + CSS menu on a page which I happy with. Ideally I wanted the name of the page to appear in it. This way I can use the web part across the site and it will change the page name itself....
0
votes
3answers
29 views

How to update a multiple lookup field in SharePoint Designer 2013 (REST API)

I would like to update a multiple lookup field in SharePoint Designer 2013. OOTB this is not possible. In SharePoint Designer 2010 it was possible. Now I would like to do this with for example a REST ...
0
votes
2answers
17 views

Use Rest API to return link from sharepoint list

I'm trying to use REST API in SharePoint to getlistitems to display the link from a hyperlink field from my sharepoint list. I AM successfully using the code to display the title field - but NOT the ...
0
votes
2answers
26 views

D3 is not rendering in CEWP (SP2013)

I am trying to learn D3 for use with REST endpoints (eventually). At the moment all I am trying to do is get D3 to render anything for learning purposes. The code below shows the d3 object loaded when ...
1
vote
2answers
35 views

How to retrieve all the group names of a particular folder in the Advanced permission tab

I have a folder in document library and each folder in it has unique permissions. Now I need to retrieve the permission group names attached to it using javascript only. On click of advanced as given ...
2
votes
1answer
23 views

SharePoint 2013 DOM dialog object

I'm using SP2013 and I am trying to refresh one of many list web parts on a page with the Manual Refresh button displayed for each list. The current display view has four lists associated with it each ...
1
vote
1answer
49 views

How to trigger enter key programmatically in search box of SharePoint 2019 library using jQuery

I have tried below code: Set the value in search text box jQuery("#inplaceSearchDiv_WPQ2_lsinput").val("med"); Trigger Enter key: var e = jQuery.Event("keypress"); e....
0
votes
1answer
42 views

How to trigger a Javascript function on folder creation in SharePoint Library?

I want to grant unique permission on folder level in SharePoint 2013 Library , Once a new folder is created, edit permission should be granted to the one who has created it. I've been using the ...
2
votes
1answer
23 views

How to find all selectable properties of a list item

If I run the query ..._api/web/lists/GetByTitle('Site Pages')/items, I get a list of properties, but it is not comprehensive. For example, FileRef is not visible in the resulting JSON, but can be ...
1
vote
2answers
105 views

Is there a Javascript report for all Lists and Libraries in a site for SP 2013?

I know PowerShell will do this, but I don't have access. So just using javascript, is there a script that can do item count, date modified, library or list, URL, and times viewed for all lists and ...
2
votes
2answers
27 views

Is “sharedhovercard.js” part of SharePoint's default installation?

I've been alerted that a security scan found a vulnerability in one of our SharePoint farms that there is an out of date version of jQuery (which presents a security risk). The file in question is ...
0
votes
1answer
32 views

SharePoint 2013 Document Library - Open pdf in New Tab [duplicate]

I am using the code snippet below to ensure pdf files in a SharePoint 2013 document library open in a new tab. This code works fine until files in the document library are grouped. Can someone please ...
1
vote
1answer
31 views

How to Show/Hide multiple column fields based on dropdown selection - SharePoint

I am using a SharePoint list in which we are using multiple columns covering different process steps to be filled based on a dropdown selection. The steps are different depending on the mission ...
0
votes
1answer
37 views

SharePoint Online and adding an interactive page (Javascript)

I haven’t developed in SharePoint for a while and trying to gain some knowledge on how to create a interactive SharePoint Online page - either classic or modern. The requirement is to display/edit a ...
0
votes
2answers
27 views

SharePoint jsLink replace picture field with value from another field

I would like to override a field with an image using the value of another field. So, I have an image library and the Name field captures the name of the image file. I also have a Hyperlink or ...
0
votes
1answer
16 views

displaying SharePoint image name as image using jslink

I have a picture library in SharePoint 2016 with the ratings enabled. I want users to be able to rate each picture in the library. In the display view, just the image icon shows and not the actual ...
1
vote
2answers
47 views

Sharepoint list: Unable to populate field using variable value

I am trying to populate the list column with calculated value in code below. While the alert & messages show the value being assigned to variable correctly but somehow field is not getting ...
0
votes
1answer
28 views

Microsoft Clarity on SharePoint 2016 On-Premises

Has anyone implemented Microsoft Clarity Analytics on SharePoint 2016 On-premises? I have tried adding the Microsoft provided code by adding it into the section of Master Page (Seattle), but the ...
0
votes
0answers
18 views

Can you add a button or link to a Custom action to a display form page using script Editor

I would like to trigger a custom action via a link or button on the form page. Yes, I have already created a button/icon in the ribbon. But what I want to do is create a button on the page front and ...
0
votes
1answer
14 views

How to query calendar items from different calendar views?

I have two different calendar views: View Name is "All Events" .../Lists/CalendarName/AllItems.aspx View Name is "Current Events" .../Lists/CalendarName/MyItems.aspx I'm only able ...
0
votes
1answer
21 views

Security Validation Error when trying to create list item across site collections using Javascipt SP2010

I'm trying to create a list item across another site collection using JavaScript. When trying to call the following function I receive this error. "request failed. the security validation for ...
0
votes
1answer
28 views

SharePoint 2013 - Warning Prompt before sharing

I'd like to warn users before sharing a file or a site to "Everyone" by showing a pop up. Is there a way to do this ? Maybe by editing the master-page on SharePoint Designer ? Thank you for ...
0
votes
0answers
57 views

Item change event gets triggered on submission sharepoint online list

I have added item change event to my text fields. but once when you click on save button it triggers around 30 times. Please see the code below. I am not sure why. fd.spRendered(function () { ...
0
votes
1answer
27 views

Injecting javascript into SharePoint online communication site

I need to inject some javascript into all sharepoint online communication site collection pages. I managed to do it in Team site by adding javascript file link in to a master page, but cannot find the ...
0
votes
0answers
11 views

API to get List field from SharePoint List to create a folder in a Shared Drive

We have a SharePoint 2019 on-premises instance. Currently we are using a workflow which will create a new folder in a Document Library within SharePoint and then files are copied into this folder. We ...
0
votes
1answer
28 views

Particles.JS Background for Body of SharePoint Page

I have created this particles.js script that I want to use for one of my SharePoint pages, but I am unsure of how to get it to insert to cover the whole background. I tried inputting it as a a script ...
0
votes
1answer
28 views

Save Modern Site Page as Template

Slight dilemma. I created a modern Site Page and want to save it as a template. I tried many steps as you can see below. Are there other ways to saving as a template? Save as a Template not listed ...
0
votes
1answer
33 views

Regex to remove “&#160”,<br> and <p></p> Javascript

I want to remove the tags and spaces: "&#160",<br> and <p></p> from my content. I tried below removing p and br tags : let Desc= response[i].Description.replace(/<p&...
0
votes
0answers
5 views

How can I create a nodejs provider hosted SharePoint add in

AS-IS: I'm programming NodeJS apps that connect to sharepoint using ADFS - no problem, works like a charm TO-BE: Register the NodeJS app as an add-in. I'm having trouble finding a way of doing this. ...
0
votes
1answer
18 views

Dynamic REST Statements

Is there a way to dynamically create a REST call and specifically I am referring to the data: section of the call. If I get the terminology incorrect by all means keep me honest. I tried some things ...
0
votes
0answers
11 views

Unable to open custom list, keeps opening in window pane

I have been working on a sharepoint site that have two seperate custom lists, one list called project starter and second list is called new drill. the project starter list is working correctly but new ...
0
votes
1answer
40 views

Trying to upload files to SharePoint list AngularJS and REST API

I have a SharePoint hosted html file with a form that I use to add a new list item to a SP list via the REST API. I am also reading data from the list using AngularJS for both reading and writing to ...
0
votes
1answer
30 views

Hide SharePoint list content/rows based on user group permissions

I'm a little padavan when it comes to coding;) I looked for the following codes via google and pieced them together;) but now of course I have reached my limits;) I have a Sharpoint Grouped Listview; ...
0
votes
2answers
47 views

Get ListCount counting only user view list items

I have below code, to fetch the count of sharepoint list items to auto generate next item number by incrementing it. But somehow it's only fetching count of list items per user (list is protected to ...

1
2 3 4 5
105