Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
16 views

Change background image dynamically in IE

I'm trying to get a page to display different background image based on Holiday. When I used the DevTools in IE and pasted the following in #s4-workspace in css, nothing happened. But it worked when ...
0
votes
0answers
10 views

SP Online rest API datetime-column value inconsistency And how to compare the dates

https://social.msdn.microsoft.com/Forums/Windowsserver/en-US/5498c43c-7124-4be5-9627-ea23bd246cba/sharepoint-rest-api-datetime-column-values-inconsistency?forum=sharepointdevelopment&prof=required ...
1
vote
0answers
16 views

SharePoint 2013 - Hide empty column with Javascript in grouped table

I have a table with several columns, not all columns contain data. So I've been using this script to hide them: $(document).ready(function () { $('table.ms-listviewtable').each(function(a, tbl) ...
0
votes
0answers
15 views

Get site owners of site collection using javascript

Is there a way to get the list of site owners from a site collection or subsite using JavaScript? I want to create a dashboard when we can just place the URL to the site and have a button where it ...
0
votes
1answer
21 views

How to get specific listview data with javascript?

I got a list and a list view. But I want to retrieve only particular list view's data. How can i do that with javascript ?
0
votes
2answers
37 views

how to set the minimum length of a single line text in sharepoint online?

I have already set the maximum length, but now I need the user to enter not less than a certain amount This is the script I'm using : function PreSaveAction() { var control = getElementByID("IBAN(24 ...
0
votes
1answer
48 views

Auto populate column data from one list form to another list form in SharePoint 2013

We had two lists in SharePoint 2013. One list (Report) is for the report and another list (Access) for access. First list "Report" consist of a different column, one column name as "Request access" ...
0
votes
0answers
19 views

Get item from external list field with ajax - SP2013

I have a list and some columns retrieve value from external list. How to get all items from that list(attached img) with REST I'm trying like this function traerSolicitudes() { var lista = "...
0
votes
0answers
7 views

Get ADFS claims using JavaScript

Anyone using ADFS with 2016. We would like to get users claims in a SPFX webpart or with JavaScript. Can't find anything on the topic
1
vote
1answer
35 views

Get unique value using Sharepoint CAML Query JavaScript

I've this code below: function ReceivePages(FirstFolderProd, FirstFolderWithoutSpaceProd, GetTagFolder){ var restUrl = "https://tenant.sharepoint.com/sites/site/Negocio/OfertaParticulares/...
0
votes
0answers
13 views

Grouped List coloring with js link not working

Based on this link in SharePoint2016 i tried to color a list. I failed. First everything was green. Then yellow. Now no longer work at all now no matter what i do (even using previous script). What ...
0
votes
0answers
12 views

SP19: Branding a Link

Is there a way to brand a link to would automatically be added to every pre-existing site collection home page and any new site collection created? I want to add a link to every team site so ...
0
votes
1answer
37 views

Calling a script through a button added by jQuery

I have a jQuery which runs through all my divs with a "code" class and prepends a button to them. The button is supposed to call another function to copy the content of that div to the clipboard. ...
0
votes
2answers
21 views

How to trigger SP's default form validation without actually submitting the form?

I'm aware that I could simply override the SaveAction, and provide my own validation for all of the fields, but is there a way to trigger SharePoint's default form validation without actually ...
0
votes
1answer
19 views

Function not called in conditional statement

I have a function that generates a table of contents. It works perfectly. However it also works when the page is in Edit Mode and causes a LOT of havoc. For that, I found the solution in the second ...
0
votes
1answer
25 views

Make web part compatible for IE11

I have a web part that works for every browser but not in IE. It seems to have troubles with "startsWith" which is a function that is not supported in IE11, fair enough. But when I changed the code ...
0
votes
1answer
18 views

Getting undefined when using getEnumerator

I'm calling a function to enumerate through a list of items with a particular ID\foreign key. When there are no items listed I get the appropriate response back, however, if any records are available ...
0
votes
1answer
10 views

SP13: Linking to Network Drive on Team Site

Normally, I can add a link that points to my network drive from my team home site quick launch with no issue. Not now. I add a the link to my network drive to a folder and will not open. I know the ...
0
votes
2answers
40 views

Front-end connection between two site-collections

I have two site collections on the same farm (on-prem SP 2016), but different domains (business.* and projects.*). I have full control on both sites. And yet, I cannot access one from the other. I ...
0
votes
1answer
16 views

Assigning Task to Group using REST and SharePoint JavaScript API

I found myself in an unfortunate position of being unable to use SharePoint Designer to build workflows and thus am having to rebuild an approval workflow in JavaScript. I am using REST to insert a ...
0
votes
1answer
33 views

Hover images(Enlarge image on Mouse Hover) from SharePoint list 2013

We had SharePoint list with image column. Our request, when some one keep mouse on image column, picture need to enlarge(hover). Can someone suggest direct how to achieve with code. Thanks in advance ...
0
votes
0answers
30 views

How do I bring the Rating Feature from Share Point to my website

I have created a coupon page and I would like to implement the rating feature Share Point offers. I created a Rating Column in my list and then made an Ajax call to retrieves all the items from that ...
0
votes
0answers
14 views

call c# method in javascript sharepoint 2016

I have a Rendering template list view created using JavaScript and i have c# class method. How can i call the c# method in JavaScript or how to include the assembly in the Javascript?. Thank you.
0
votes
0answers
14 views

How to show lookupcolumn field data in custom form field

Created a lookup column in my sharepoint list that fetch data from different list Now i created a custom dropdown fields i.e, <select id="test"></select> How i will display the dropdown ...
0
votes
1answer
13 views

How do I filter elements from a Share Point list by category in Java Script

I have a created an accordion that has 7 different categories (Auto, Entertainment, Health and Beauty, etc). The content of each category lives in a SP2013 List; each list item was given the ...
0
votes
1answer
20 views

How to access Everyone But External Users via Javascript in SharePoint Online

When adding a group to a site via Javascript, I know you're supposed to use the group ID - but if I want to add "Everyone except external users" to that site with Read permissions, what ID do you use? ...
0
votes
1answer
34 views

Jquery Validation Plugin Error This[0] is undefined - Sharepoint Online Add-in Development

I'm development a Sharepoint Hosted Add-in in Sharepoint Online tenant. I'm using Jquery and Jquery Validation to make form validation, but I have a issue with JQuery Validation because of get error ...
0
votes
1answer
14 views

how to get people picker field value and store it in a variable

i have a small requirement where in, i have a column "Employee Name" as a people picker field, now i just want to retrieve the employee name value in a variable after the user has entered his name in ...
0
votes
0answers
7 views

Comparing changes in multi-value fields in a better way in SharePoint Online

We have created a user database and as part of this we have a few multi-value fields in the SharePoint List. When a new value is added to the multi-value field we use the versioning to see which of ...
2
votes
1answer
31 views

Check if a user is a member of SharePoint group JS REST API using async await

How can I check if the current user is a member of a specific SP Group using REST API and async/await? _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyname('" + grpName + "')/...
0
votes
1answer
33 views

How to SP2013 list put it into DataTable dynamically?

I have a sharepoint 2013 list with some items, I need to put it into DataTable dynamically, is possible create the html table automatically?
0
votes
2answers
32 views

SharePoint Custom Webpage/Part Not Consistently Loading

I hope this is the right place I have been in a role within my organization working with SharePoint for a couple of months now, so i'm a newb more or less. I have some experience (again a novice) ...
0
votes
1answer
32 views

Retrieve users info with js and sharepoint

I am facing following issue: I need to retrieve users from the whole domain not just siteusers list at sharepoint so that can can manipulate them and for example add them to sharepoint groups. I ...
0
votes
1answer
30 views

Freeze First Column of Sharepoint online List view using Jquery/javascript [duplicate]

i want to fix first column (ex: Title column) of my sharepoint list view, so that whenever the user scroll horizontally the first column should be fixed. Thanks in advance for your support.
0
votes
1answer
31 views

Only Showing Timeline in Task List

I know how and find many ways how to hide the timeline from the task list but I don't find where I can just show the timeline and hide everything to the list. Question: What can I do to show the ...
0
votes
2answers
17 views

Connected Excel Spreadsheet to SharePoint List

Here is what I have done and what I am trying to do. I have a SharePoint list that I exported to Excel and then created a connection. When I add an item in the SharePoint list the new items are ...
0
votes
0answers
13 views

SharePoint 2013 Hide list row based on another list with javascript

I have two lists, Parking Slots and Reserved Parking. Reserved Parking has a look-up column (Slots) from Parking Slots. I have a page where both lists are displayed. What I need is a javascript ...
0
votes
1answer
15 views

Javascript to read site collection storage volume

It is possible to read the storage Volume of a site collection with JavaScript?
1
vote
1answer
42 views

javascript not working first time after iisreset in a visual web part

I am having a bug in one of the visual web parts. First of all, this is not my code and I am not an expert in javascript. Secondly, this issue is only happening the first time after the pool has been ...
0
votes
2answers
28 views

ctag parameter is getting added to js file on web page Sharepoint online

I am working on CEWP.when I am trying to debug the javascript file.On button click i called a function but function is not getting called becos js file not loaded properly .At the end of js file some ...
0
votes
1answer
18 views

How to log data to a database using javascript?

I am to track who viewed a specific document in a document library, I found out that there is no Item Viewed event or similar event in the SPEventReceiver class. SO I developed a spfx solution that ...
0
votes
0answers
18 views

How to attach SP date picker to text input via javascript?

Created a web part page to test initializing SharePoint controls via javascript, can't get the date picker working. Its been driving me nuts for hours now. Anyone see any obvious mistakes? <input ...
0
votes
1answer
39 views

Inserting dynamic data in a sharepoint list using jsom

I am trying to insert dynamic data (question number, question and answer checked) to a new sharepoint list. The data needs to be read from another list, i.e. "Questions1List". I have a quiz page in ...
0
votes
0answers
38 views

Inserting multiple rows in a SharePoint list using JSOM

Hi I am trying to insert the data in the form of multiple rows to a SharePoint list. I retrieved question number, question, choice answer options as shown in image. Now, I want to insert the question ...
0
votes
1answer
19 views

SP.js loading issue while retrieving list items using JSOM

Hi I am trying to retrieve list items using JSOM. But, the problem occurring is that SP.js is not loading correctly. It shoul load before the function gets executed. I am confused about where to use ...
0
votes
0answers
30 views

success call back or REST call not firing

Successfully adding items to a list but success handler not firing. Anybody know why? function addListItem() { var guidance1 = $("#guidance1").val(); var guidance2 = $("#guidance2").val(); ...
0
votes
2answers
60 views

How to get email of user's domain name via javascript?

I am looking for a way how to find some users emaill address based on their domain id. I found many solutions for Current users via user = clientContext.get_web().get_currentUser(); however i want ...
0
votes
2answers
53 views

How to add JS validation on SharePoint new item form to check date field populated or not

I am working with a Task list in SharePoint online. On the new item form, I have a field called 'Due Date' (Internal name: DueDate) which is set to optional and for one of the Flow requirements, I ...
0
votes
1answer
26 views

The property or field has not been initialized when setting a lookupfield id on another field

My snippet code below. What i'm trying to do first is be able to update batch items with large number of items(THIS WORKS) and in between be able to get a lookup id field from one of the fields and ...
0
votes
0answers
10 views

Unable to pull in current item on EditForm.aspx using StratusForms

I'm using StratusForms for a SharePoint 2016 classic application (system admin won't enable modern pages) and was able to successfully use a CEWP on NewForm.aspx to contain my code and submit to my ...