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
629 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
24 views

Refresh the Repeated Section when dropdown value has changed

Can anybody advise / help how to make the Repeated Section [ItemDescription] refresh when a dropdown value [ItemName] has been changed. I have used a rule to make the fields within the repeated ...
2
votes
2answers
66 views

Referencing javascript library in content editor webpart

So i have added content editor webpart in NewForm.aspx and reading the code to javascript file called HideFields.ps1. SO the script as below: HideFields.ps1 <script type="text/javascript" src="...
0
votes
1answer
17 views

Filter list data after retrieving the list using JavaScript

I am trying to carry out a number of queries on a share point list. I know you can use CAML queries to filter the list to only show specific information. However I am looking to retrieve the entire ...
0
votes
1answer
12 views

Auto populating sharepoint date field on SP new form shows wrong year value

I have a date column called Today Date on one of the list forms. I am trying to auto-populate it and set it to current date when newform is opened. Its pulling current month and day value fine but not ...
0
votes
0answers
22 views

How i can set a Date/Time field to be required if a People/group field contain a value

I am working on a custom list inside sharepoint online classic UI. and inside the custom list i have 2 fields:- "ResponsibilityOwner" --> People/Group which allow single value. "...
0
votes
1answer
15 views

Popupmenuitem Ribbon

In sp2013 i have 2 list Documents and Notes. I have created a tablet device based site with reponsive UI. In the document library list for example the Manage ribbon Group is displayed as popup as ...
0
votes
0answers
31 views

Unable to capture when a managed metadata column is changed inside my sharepoint new/edit list forms

I am working on a sharepoint online classic team site. and inside the classic team site i have 2 lists:- Responsibility List. Customer site List. Both of the above lists have the same managed ...
0
votes
1answer
20 views

Creating a URL link with href not going to the URL

We have a page that is using AngularJS. I am creating a link: <div ng-if="breakout.AttachmentFiles"> <div ng-repeat="file in breakout.AttachmentFiles" style="display: flex; align-items:...
1
vote
1answer
31 views

Get users' Email and save it to a Text field on NewForm

I have multi value Person or Group field and a Multi text of Line field in my SHarePoint online site. On NewForm I want to fetch all the users' EMail and save it to Multi text field separated by ...
0
votes
1answer
626 views
0
votes
0answers
18 views

How to share SharePoint online page on social media?

How to share SharePoint online page on social media (Facebook, Twitter and LinkedIn) programmatically (JSOM or REST API) so that everyone (external users) can see the content of this page without ...
2
votes
1answer
627 views

Redirect to thank you page after submitting survey

I'm using sharepoint 2013.I created a survey using the survey app. I added a web part script to the survey. I tried to redirect to a thank you page after clicking the finish button on my survey. It ...
0
votes
1answer
16 views

Hide element in IE in custom NewForm.aspx or EditForm.aspx

In custom NewForm.aspx or EditForm.aspx, the ribbon is hidden and the following is added: <div class="row"> <div class="colFull" id="attachmentsOnClient"> <span dir="ltr"> ...
0
votes
1answer
28 views

RangeError JSOM set_item update

I tell you that I have been fighting with this bug a few days ago. He is winning ... On the EditForm I have a grid that points to another sherpoint list. I can add listitems to that other list or edit ...
0
votes
1answer
696 views

Custom Ribbon Button with javascript

Hi i'm working on a sharepoint Addin i wanna create a custom ribbon button using javascript , i tryed with xml it's work fine using this code : <?xml version="1.0" encoding="utf-8"?> <...
1
vote
2answers
686 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
1answer
11 views

Can We host JavaScript files of our SharePoint framework CSOM solution in the Workflow manger dedicated Server?

We are developing a custom solution using SharePoint (2016) Framework. So to deploy the solution: We put solution in the app catalog. 2. We need to host JavaScript files. We don't want to use Azure ...
0
votes
0answers
11 views

SP.UI.ModalDialog.showModalDialog({}); not work on second clicked

i have a problem, the first click on button, have functionaly, but in second click return this error. sp.ui.dialog.js?rev=3Oh2QbaaiXSb7ldu2zd6QQ%3D%3D:2 Uncaught TypeError: Cannot read property '...
0
votes
0answers
7 views

SharePoint 2010 Hide SP list fields based on status of another field in the new, edit and view forms

I have a SP 2010 list and I am looking for an option to hide fields from the new, edit and view forms based of a status of another field. Below is the code i have working so far for the new form but ...
0
votes
2answers
25 views

Unable to highlight a row in yellow if a date column value is today's date

I am working with a SharePoint list that has a date & time type column called Change Window Start (internal name: Start_x0020_Time). I am using below code to highlight the item row and font color ...
0
votes
1answer
27 views

Truncating our multiple line text fields inside our list views using JSLINK

I am working on an online sharepoint custom list. and we are rendering our list inside the classic UI. now inside the custom list's list view we have 3 fields of type multiple line of text. And if the ...
1
vote
1answer
657 views

Manipulate Filters in Javascript

Is there any code in JavaScript which allow to manipulate filter to a library webpart?
1
vote
1answer
31 views

How to highlight font color of task item to red for overdue task

In SharePoint online task list, I am using below code to highlight a row in yellow if task is overdue: <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></...
0
votes
1answer
30 views

JS Cascade code not working for SPO document library edit form

I have a document library setup with content type enabled in SharePoint online. There are total 4 content types and out of those 4, for content type called 'Closing Documents', I want to perform ...
1
vote
1answer
675 views

getItemByID is not a function

I have the following script that is returning the error message "list.getItemByID is not a function" and I can't figure out why. All examples use this function. I am trying to iterate through ...
0
votes
1answer
683 views

REST addViewField “Cannot handle the data at position 0.”

I'm currently writing an initialisation script for a SharePoint-hosted application which checks if a list (used for launcher items) exists. If it doesn't, then it runs through a series of processes to ...
1
vote
2answers
698 views

How do I hide the FINISH and CANCEL buttons on SharePoint survey?

I am working with SP online. And i have written a custom code "JavaScript". I am primarily looking to hide those Two button's from my SharePoint survey list as mentioned above in the title. Below is ...
3
votes
3answers
398 views

How to show/hide columns based on value of SharePoint choice check box

I am working with SharePoint online and in one of the lists, I am using a choice check box column called 'Vehicle Type' with following choices: Personal Vehicle, Company Vehicle. I am looking to do a ...
0
votes
1answer
659 views

SharePoint cascading drop down on visual web part using client side code

Hi I am working with cascading drop down in a visual web part. I am able to complete this functionality using c# but I want to implement this functionality using JavaScript jquery basically I want to ...
7
votes
4answers
17k views

Get Current Login User Profile Properties SharePoint

I need to get current login User profile properties provide information about SharePoint users, such as display name, email, PictureUrl and other business and personal information including custom ...
0
votes
0answers
34 views

SharePoint 2010 Dynamic Table Images - JavaScript Needed!

My team and I are trying to create multi-project-tracking dashboard with a more sleek look than that of a traditional KPI List. We have created a table on a team site that contains multiple images - ...
0
votes
0answers
3 views

Store ajax in Webpart (project server, sharepoint,…)

I'm trying to read data from my grid in project server 2013 and later in project online So I customize my ribbon, and add a webpart on the page If I add files with code which start with : , it's ...
0
votes
2answers
23 views

Javscript to show form fields editable

I created two extra html form fields and when we fetch data using requestID then all form fields disabled including that fields i created so i want help that how i will show all forms fields disabled ...
0
votes
0answers
17 views

List of users having access to folder/document in the library (SPServices)

I am trying to list all users/groups who has access to folder inside library. Code below which I tried works fine for library/list itself but not for (sub)folder. My guess is that it is not possible ...
0
votes
1answer
82 views

Prevent item form delete from redirecting

TL;DR I need a way to prevent the edit form dialog (iframe) from navigating the top window when I click delete on an edit form. I found this thread the answer given (also detailed in this blog post) ...
0
votes
0answers
14 views

Making a “Non-Required” field, set to required based on another Form Element selection

I have a drop down where if I select "Yes", two other form fields that are hidden via hidecolumn, will then show via showcolumn event. The drop down is a required field and so are the other two form ...
0
votes
0answers
15 views

JS script to convert repeated section from XML to HTML - help required

I found this script, see below, which converts the XML format generated from the repeated section within a sharepoint list and renders it in HTML format. <script type="text/javascript"> ...
3
votes
3answers
1k views

How to HIDE selected sharepoint list fields/Columns using Javascript or Jquery on VIEW page?

Please Help! I have a custom list with 3 columns, "Slno","Language","Status".Status is a choice field with choices "Ongoing" and "Terminated". The Color of the "Language" column changes based on the "...
0
votes
1answer
704 views

Populate a Word Template with Dynamic Data From a HTML Form on a Sharepoint Page

I have a SharePoint site. What I want to do is: 1) Upload a Proposal Template and create an HTML form that allows our sales guys to enter customer details 2) Allow the sales guy to select some options ...
2
votes
1answer
58 views

Using TypeScript global variable with SharePoint functions

Using TypeScript and Angular, I have created a function named getTasks() that I want to fire when a modal is closed. This is the function: getTasks() { this.http.get(`https://example.com/_api/web/...
0
votes
2answers
44 views

showModalDialog passed arguments not available on load

I have a page that is using SP.UI.ModalDialog.showModalDialog() to open a NewForm for a list. In the open code I'm passing some values in the args options property as described in this documentation. ...
0
votes
1answer
19 views

Get Javascript value using Powershell

I have a Javascript value in my Webpart and I want to use this value in my PowerShell script! Is it possible? JAVASCRIPT CODE: function RetrieveLog() { var getItemsUrl = "/_api/Web/Lists/...
0
votes
1answer
12 views

Auto complete text box

I followed this link to auto complete. I am missing bunch of employee as I type. for example, I have a butler, jonathan but he is not showing up.
4
votes
2answers
913 views

ddwrt:EcmaScriptEncode Explained?

Does anyone know exactly what ddwrt:EcmaScriptEncode does? (Which char mappings, etc.?) M.
4
votes
1answer
681 views

SharePoint Workflow Subscription Service failed

I have one requirement to start the SP workflow through JavaScript. For this, I have wrote some lines of code to start the workflow. But I am getting a Subscription failed error due to undefined ...
0
votes
2answers
677 views

Disable Edit WebPart and/or Snippet link in a Script Editor Web Part on SharePoint Page?

I know it can be done with client side coding, but maybe there is a built in way to do this in SharePoint 2013. I have a web part I share with other sites, but do not want site administrators seeing ...
0
votes
0answers
20 views

Restore of Web Parts in Page Edit Mode

I use the following code to minimize a number of summary link web parts on a SharePoint 2016 welcome page with web parts and it seems to do the expand/collapse work properly in view mode. However, in ...
4
votes
1answer
690 views

401 (Unauthorized) in Google Chrome

When I Get the document list from SharePoint site I get this error "401 (Unauthorized)" only in Google Chrome, but in IE it works. This is my code function GetListItems() { var siteURL = "http://...
0
votes
1answer
75 views

Force template download instead of opening file using code

I have a Templates document library, where the piece of code below has happily forcing the download of a template document instead of the file been opened. However, it has stopped working. The ...