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
2answers
744 views

Add OnClick Event to SPFX Html - No Framework

I have an SPFX Web Part (No Framework) and would like to add an onClick event to my which will call my function swap(). Code: export default class ExpandableIFrameWebPart extends ...
0
votes
0answers
15 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 ...
3
votes
3answers
1k views

Conditional formatting for SharePoint Online column.

I am working on a SharePoint Online 2016 site collection and need to add conditional formatting to a few drop down fields. The drop down options are: 1: Red, 2: Amber, 3: Green. I want the field in ...
1
vote
3answers
7k views

Javascript not working in IE but work works in Chrome

I had a long search and until I found a working script to use the logged in user id. Finally I have found the following Javascript code, put it in XSL to be used in an XMl viewer web part: <script ...
6
votes
1answer
2k views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
0
votes
1answer
14 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 ...
2
votes
1answer
2k views

Grouping SharePoint REST API results

I am building a customized events feed via REST query. I have a feed of all events in the calendar, filtered on date range and sorted, but I'd like to take it a step further and group the results by ...
0
votes
1answer
2k views

SCRIPT1004: Expected ';' error in the browser

I am using this script to hide 'Edit' button from SharePoint ribbon on my custom webpart's ascx page and calling it in the page load: function hideEdit() { var edit = document.getElementById("...
0
votes
2answers
592 views

Getting choices from choice field in Online using JSOM

I am trying to get all of the choices from a choice site column in SharePoint online. Using the following code I get to the success method but it errors out saying 'field' is undefined. I don't ...
0
votes
2answers
1k views

how to control speed of carousel?

Currently using bootstrap.min.js in my share point slider web-part. i have custom property "Speed" ,trying to control speed of carousel from code behind how to do it?
0
votes
0answers
10 views

Custom JS produces different results based on user's permission level in SP 2013 [on hold]

HELP! I understand this question is a bit vague, however, that is because I have never run into this issue before and I have no idea where to start. Anyone who can share a similar experience and ...
3
votes
1answer
5k views

Full-Calendar Js not showing events

I have created an html page in which i have palced the full-calendar code. the script retrieves data from my shareoint calendar list - "Room Reservation" using SP-Services. I am able to get the ...
4
votes
3answers
1k views

Add showWaitScreenWithNoClose to SPServices GetListItems

With a button on page which calls the function createListItems() which is added to the page as a link in a CEWP. The function takes 10-25 seconds to complete (get items from one list and add them to ...
1
vote
2answers
2k views

Set value in a column on click of a button in SharePoint

I have a customized form in SharePoint 2013. I want that on click of the submit button on the list, a value will also update. Currently on click of the submit button, it is saving the values and ...
0
votes
1answer
2k views

Print the content part of DIV in SharePoint 2013

I`ve researched a lot and spent more than 24 hours on it, but what ever reason adding the following in Content Editor WebPart on SharePoint 2013 List page, doesn't does the job as expected. ...
0
votes
2answers
2k views

Add SAVE button to Custom Form

I have a custom HTML form and I need to add a second save button to my form on the top. So I created my button and can not find the right javascript function that will submit my form. Basically, I ...
1
vote
2answers
722 views

Retrieving Lookup Values, Javascript SharePoint 2013, Not Working

I've seen a lot of info on the above question but none of it has answered what I'm looking for, so far. I'm trying to retrieve list items that have a great number of lookup fields. I've had success ...
0
votes
2answers
30 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
9 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 ...
2
votes
1answer
23 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
0answers
6 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 ...
0
votes
1answer
18 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
1answer
30 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
28 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.
1
vote
1answer
9k views

How can I make links in the left navigation open in a new tab?

I'm trying to make two links on the left navigation open up into a new tab as they are external sites. It should be as easy as adding target="_blank" to their HTML element but when I wrote some jQuery ...
0
votes
2answers
44 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 ...
1
vote
1answer
594 views

Alert me How to display word document in browser window?

We need to display a word document inside the browser as part of our SharePoint application. But when we tried to achieve this, it is always showing a popup with options like Open, Save and Save As. ...
1
vote
1answer
34 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
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
3k views

“Permission Denied” error in IE after adding content editor to form

A site that I have not modified in several weeks has suddenly stopped functioning in Internet Explorer as it has for the past few months. I have a content editor in my list on the New, Display, and ...
1
vote
1answer
1k views

Add button to webpart with javascript

I want to add button to all web parts of my home page instead of add new item link and I've no idea how to create it For additional information I am using share point 2013.
6
votes
1answer
4k views

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
0
votes
2answers
12 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 ...
5
votes
2answers
3k views

How can I populate a dropdown with a SP list?

I have a SP List with data that I need to be in a dropdown list. I also need these to have specific classes. I'm trying something like the following but having no luck: $().SPServices({ ...
0
votes
2answers
2k views

How to store the hit count of a page in a sharepoint list.

I have created a page and now I want to get the track of hit count of that page. I want to store that no. in a sharepoint list. On every page load the count should get increased by 1 and get stored ...
0
votes
1answer
17 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
25 views

What is this unwanted files in SharePoint Online when we keep debugger?

I am facing very strange issue in SharePoint Online. I have a kept some JavaScript code to a Content Editor Web Part on a SharePoint Online Page. When I try to debug the JavaScript file, instead of ...
0
votes
1answer
1k views

Why does SharePoint 2013 deletes my Javascript code when saving a page?

I have SharePoint Online hosted by Microsoft, individual edition. I noticed that when adding links with a hash (#) to a page, these links would not be saved. I thought it was a bug and decided to ...
0
votes
2answers
23 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 ...
1
vote
1answer
593 views

Access sharepoint web service from separate HTML application

I want to access list items from a SharePoint 2010 site in a HTML application (not connected to the SharePoint site). My approach is to use SharePoint web services by passing user credentials through ...
2
votes
1answer
39 views

SharePoint online TextEditor Option for Javascript and other code no longer available

I have noticed a recent dramatic change in SharePoint online. I have multiple java script and html scripts that control content editor webparts on my SharePoint site. Previously I could view and ...
0
votes
0answers
12 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
2answers
205 views

How to redirect users to a different page/URL on a SharePoint save button click in New item form?

I am having an issue about redirecting users to a different URL on Save or Cancel button. First of all I have used below code to change SharePoint list new item form's Save button to Submit. <...
0
votes
1answer
33 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
23 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
18 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
2answers
46 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
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(); ...
3
votes
1answer
2k views

How to move/copy a document set via JavaScript CSOM

Could somebody give a JavaScript CSOM example of how to move/copy a document set from one document library to another? The document set has a derived content type with a list of metadata, and it ...