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
1
vote
2answers
53 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 ...
1
vote
1answer
33 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
3k 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
47 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
107 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
123 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 ...
3
votes
2answers
113 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
115 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
77 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
1k 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
35 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
43 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
57 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
55 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
38 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
22 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
37 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
29 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
1answer
91 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
1answer
70 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
54 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
293 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
1answer
108 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
1answer
128 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
47 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
67 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 ...
0
votes
3answers
110 views

Hide text in SharePoint 2013 using script editor

I am trying to hide the date (see screenshot) because it displays the wrong date. Probably for now the easiest way to fix is to hide the date. When I click on the date it brings me to: <span title=&...
0
votes
1answer
50 views

How can I open a Provider Hosted App in SP Modal Dialog in SharePoint Online?

I need to open a provider hosted app inside a SharePoint Modal Dialog. The provider hosted app is hosted in AZURE Web App Services. I have tried several examples that I could see in Microsoft ...
0
votes
2answers
3k views

Axios response.data is string of the XML data instead of JSON object

Axios get call receiving the right information but it comes back as a string of the XML data. I need a JSON object. I am grabbing all the tables on the page then I filter through them and then I want ...
1
vote
0answers
28 views

SharePoint 2016 List - Edit Form - Radio Buttons

I have a SharePoint List to collect some information. I have two radio buttons and based on which radio button is selected, only specific fields will be shown and the others hidden. This works great ...
0
votes
1answer
35 views

SP2013: Disable text or number field once populated

I am looking for a jQuery script to conditionally disable two field types: Disable a text field if it is not blank and Disable a number field once it is non zero. I see many posts on disabling ...
0
votes
1answer
27 views

Calcluated Column multiple IF with SEARCH statement coming up as #Name?

I want to search each cell in a column for a certain pharse. I figure I should use IF statements but since the following text can be anything I need to incorporate a SEARCH statement as well. Like at ...
0
votes
2answers
192 views

Author/Id returning number instead of name

I'm using the following URL to get data from a list. The last item in the URL is the Author/Id but it returns a number. How can I get the user's name instead of the number? url: https://.../org/eu/EU3/...
0
votes
1answer
32 views

Accordion Collapses Immediately After I Expand a Row

I am creating a drop down table with Accordion on my SharePoint site. I referenced this page (P.S. I hate W3Schools) https://www.w3schools.com/w3css/w3css_accordions.asp#:~:text=An%20accordion%20is%...
0
votes
1answer
104 views

SharePoint Online Show/Hide multiple fields based on choice

I have a form similar to the one below, I am using script editor in web parts on SharePoint Online. If I select 'YES' it will reveal a second drop down list hiding 'Item 1'. If I select 'NO', it will ...
0
votes
1answer
90 views

Hide particular choice option

I have a SharePoint list which has a choice filed. Choices are A, B, C. Is there anyway I can hide B from the users. I don't want to delete the B option I just want to hide it from users. Regards
0
votes
1answer
210 views

Filter list by Author (Created By) field with rest api - SP Online 2019

So I'm sending a REST query like: _api/web/lists/GetByTitle('List')/getitems?$select=AuthorId It works fine, I see 49 records with AuthorId. Now I want to filter by this column. Then I want to filter ...
0
votes
1answer
2k views

OData query to get the results of two specific columns

I stuck on how to get two specific columns of data. My query: {site}/_api/web/lists('{site_guid}')/items?$select&fields eq meatballColor,meatballExplained I only get 7 items coming back when it ...
0
votes
1answer
31 views

Javascript REST results processing

I'm using JavaScript to pull data from a SharePoint 2013 list. The REST request works fine and I can see the data in the debug windows of Chrome. I am struggling to determine how to access specific ...
0
votes
2answers
24 views

Sharepoint:formField Javascript

We have a custom SharePointFormField for your DisplayForm and DOM Looks like this. <div class="FormRow"> <div class="FieldLabel"> <a name="SPBookmark_FileID&...
0
votes
0answers
115 views

SPFX Source URL Redirect NOT Working

I am currently working on a custom WebPart in SPFX and am having some issues with a URL redirect. The code is looking to see if a field is empty, if the field == empty then it will automatically ...
0
votes
2answers
144 views

I need JavaScript to add sequence based on value in last added item in SharePoint list

I need a JavaScript to add sequence number based on sequence number in last added item (I do not want to use ID for increment in sequence). Eg: Auto sequence column is with value 1 ... on adding ...
0
votes
1answer
37 views

How to Set Color Indicator for the Next Page

I have a list on SharePoint with classic view mode. I create color indicator in Content Media Web Part with uploaded file Java Script in Site Assets. But when I make the item limit per page to 10 ...
0
votes
0answers
36 views

How to Create Color Indicator in Column sharePoint List

I have sharepoint list with clasic view mode. in that list I have: Task Name, PC Name, Planned Start Date, Planned Due Date, Actual Start Date, Actual Completion Date, Alert Zone. Alert Zone consists ...
1
vote
1answer
226 views

How to assign an ID or Class to specific Webpart in Sharepoint

I’m working with Sharepoint on a client project and I’m finding it a bit cumbersome to navigate. I see that Sharepoint seems to generate dynamic ID names for its web parts when they are created; an ...
0
votes
1answer
27 views

How to query SharePoint items that contain one or more text values CAML?

I want to query for SharePoint items that contain at least one or more specified texts. For example, I have a field called "Pets." A SharePoint item would have a value that looks something ...
0
votes
1answer
77 views

AJAX POST Call to More Than One SharePoint List

I have been working on a project for quite some time now. I have found this post somewhat useful, but am unsure if it is correct or not for my utilization. Functionality: Read in SharePoint list ...
0
votes
0answers
53 views

SharePoint 2013 custom JS not working in IE11 list view

I seem to have some browser compatibility issue but not sure what is causing the issue. I wrote my code using Chrome and buttons, Javascript, etc. runs good. Everything displays as it should. I'm ...
0
votes
1answer
125 views

Sharepoint list last modified date

I use this code to get the date of the last edit of a certain list. Now I want to loop through the listitems and identify the item that was changed last, so i.e. that has the same date as the ...
0
votes
1answer
128 views

Removing Name from News Web Part

I am using News web part on a modern page. I add a new News and I see it on my home page. But I don't want my name to appear. It has my new News but it has my name and date that I created the News. ...

1
3 4
5
6 7
107