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
1answer
7 views

OnSuccess of Ajax request check if array contains data

I have an Ajax request, when it gets to on success function I start to do things with data.d.results like reading through and filtering in another REST API. However sometimes data.d.results.ID for ...
0
votes
1answer
715 views

Read Excel sheet located in the document library in SharePoint Online

My requirement is to read the Excel sheet data which is located in the SharePoint Online library using JavaScript and get specific values from columns based on the comparison. E.g., if cell(a1-a20) ...
1
vote
0answers
8 views

Is there extra Javascript involved in the 2016 version of a multi-lookup control?

I have to filter the available options for a multi-lookup field based on the value of a Taxonomy field. I had it working in 2013 doing this: On page load, detach all the option elements from the ...
0
votes
2answers
811 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 ...
0
votes
0answers
8 views

unable to get treeview dropdown in classic site

we are facing issue with N level tree view drop-down while getting dynamic data form list using 2 columns data in classic share point site. 1.column is parent 2.column self lookup column to parent ...
0
votes
1answer
20 views

Submitting to SP List, Input string was not in correct format error JavaScript

I am getting the error, "Input list was not in correct format error" My sharepoint list has single text fields so i cannot see the problem function savingsdatick(varid) { //Get Current ...
0
votes
1answer
12 views

Provider Hosted App-Not able to get data from list using JSOM or Javascript in sharepoint 2016 On-Premise

My Provider-Hosted App published and hosted on IIS with https. The URL is like: https://localhost:44343/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fecontent&0319c41%2Eecontent%2Eelibrary%2Eapps%...
1
vote
1answer
21 views

Event after Ribbon tab context/commands load?

In MS Project Server, on the Project Center page, I want to make it automatically show linked sub-projects in the main view. You can get the sub-projects to show by clicking on the PROJECTS tab in ...
0
votes
2answers
2k views

Lists with null columns not returned when retrieving custom lists with Caml query and Javascript

I am retrieving a list with caml query and Javascript. Everything works fine besides the fact that I have an image column and not all lists have that column populated: Here is a sample query I am ...
4
votes
1answer
1k 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://...
3
votes
1answer
964 views

Filter sharepoint list using multi line text field

I'm trying to filter a sharepoint list using ajax api. So one of the filtered field is Multi line text field (FieldType.Note) , after performing request it throws an error telleing that the field ...
1
vote
2answers
18 views

jQuery hiding column based on another column's value

I've successfully used the following script in NewForm.aspx to hide a column 'Date SharePoint checked' when another column 'Check SharePoint?' is set to 'No'. When I open the same list item in ...
0
votes
1answer
27 views

addEventListener not working on SharePoint list form load

I have a SharePoint list form and I prepopulated certain fields with sharepont user properites. I also decided to use DOM development for form manipulation on the list form. Using the DOM, I was ...
1
vote
5answers
4k views

Zip document library using JSzip

How do I zip and download all the files (keeping the folder structure) from a document library using Jsom and jzip Library? Download multiple files then compress to one zip file using JSZip & ...
0
votes
2answers
875 views

Unable to get property 'createRange' of undefined or null reference

I have a SharePoint custom list form with a bunch of Javascript running on it. In particular I have one field where it gets its choices from a lookup to another list. The lookup returns n versions of ...
1
vote
3answers
1k views

pass parameter to 2nd function jsom

Hi I have the following code, how can I pass oList into function onQuerySucceeded? function lockMandaysItems(tID,oList) { var clientContext = new SP.ClientContext.get_current(); var oList = ...
1
vote
1answer
937 views

Files move from one library to another library using jsom

Below code is working fine, but inside for-loop if I put alert,then moving multiple file but if I remove, only one file moving. I do not want any alert/pop up. Please suggest. ...
4
votes
1answer
789 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 ...
2
votes
2answers
52 views

Uncaught TypeError: Cannot read property 'apply' of undefined at Array.<anonymous>

I want to retrieve all the lists title of my SharePoint site and add in them into a list. But the error "Uncaught TypeError: Cannot read property 'apply' of undefined at Array." appeared in ...
0
votes
2answers
23 views

Triggering workflow via javascript not working

I'm not super familiar with javascript and how it interacts with SharePoint, but I was tasked with starting a workflow on several items with one click. I did some research and found this which walked ...
2
votes
1answer
913 views

use SP.UI.Dialog on page load without ExecuteOrDelayUntilScriptLoaded

I know I can do this: ExecuteOrDelayUntilScriptLoaded(function() { SP.UI.ModalDialog.showModalDialog(..) }, "sp.js"); But I want to call SP.UI.ModalDialog.showModalDialog as soon as the page ...
0
votes
1answer
802 views

How to create a html form webpart filter for 2 list columns

I have a html form webpart (in the form of textbox input). I would like to filter 2 list columns using the same webpart: So instead of the usual filtering for 1 list column, this webpart will be used ...
1
vote
2answers
37 views

Javascript : Retrieve an item value from SP List

Before explaining my problem, I give you the context. I've made an first page that will display a "Marquee" message (message that will scroll horizontally). I would like to make possible to ...
0
votes
0answers
18 views

How to embed images to email body with cid method using SP.Utilities.Utility.SendEmail

I believe i have to use the AdditionalHeaders property, but im not sure how I tried to insert headers like: Content-Type: image/png; name="moz-screenshot.png" Content-Transfer-Encoding: ...
0
votes
1answer
739 views

Filter SharePoint List based on values from another list

I'd like to filter SharEPoint list using values from another list via JS Link. I know how to filter using for example list of ID's. I found nice article for that but now I need firstly to connect to ...
0
votes
2answers
23 views

update filed another document library with current list input filed column on SharePoint 2013

Hi SharePoint Developer experts, We have one document library and one List on SharePoint 2013. Users update list daily base. There are two column on the list with name as "Document Title" ...
0
votes
1answer
971 views

How to save CSV data to SharePoint 2013 list without iterating through the each record using JavaScript/REST?

I am having CSV with more than 3500 records. My need is to import the CSV data to SharePoint 2013 custom list. I have to achieve this programmatically. I have already tried some bulk operations/...
0
votes
1answer
841 views

Get document from Document Library using Javascript

I am trying to get a document from document library.I am getting the file but I can't get its binary value. $.ajax({ url: fileUrl, binaryStringResponseBody: true, headers: { "...
1
vote
1answer
781 views

Get List Items from Sharepoint Online to on Premises

I'm trying to get some list elements, using javascript code, from a Sharepoint online instance to the internal, on premises, Sharepoint instance. I've been looking for the past days at Sharepoint's ...
2
votes
1answer
1k views

Add Dynamic Property Panes to SPFX

I know this has been asked 1000 times, but i've tried everything in the first 2 pages of google so i've decided to come to you guys for help. I'm trying to create some dynamically added property ...
2
votes
2answers
880 views

Get the data from Multi line Text field and set it to text area line by line

I have a multi line rich text field and I want to get the data from column and set in text area line by line. I tried Splitting but I need another solution if possible.
3
votes
1answer
812 views

SharePoint 2013 App Office 365 copy list item

I try to build an SharePoint hosted app, have started with a custom menu action. When I choose it I want to copy the selected item and automatically change some metadata for it. Problem is I can't ...
1
vote
1answer
815 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
1
vote
1answer
998 views

How to check page layout from javascript of current page in sharepoint 2013?

Does anyone know how to check page layout from javascript of current page in sharepoint 2013? Ideally I would prefer to not use any ajax calls. Thanks
0
votes
3answers
87 views

How can I have yes, flagged and no buttons in a column

I have a document library where the CEO wants to see three buttons. If he has read the document he wants to click on Yes, otherwise it will always be No. If he clicks Flag it means it needs to be ...
2
votes
3answers
3k views

Javascript Functions in Calculated column

I am trying to use javascript functions within an calculated column which is working pretty fine e.g. if I use the following formula: ="<img src='/_layouts/images/blank.gif' onload=""{" &" ...
0
votes
1answer
52 views

Javascript changes to get the correct picture for slideshow webpart

I'm referencing article: http://www.markrackley.net/2014/03/17/sharepoint-20102013-tip-of-the-day/ to have a webpart for Tip of the Day. In my case the message will ideally be Tip of the month. Now ...
0
votes
2answers
77 views

how do i create a custom UI for a list column

What is the best way to create a custom feature to customize the UI of a list by filling in the column and/or field green when the value for row item = yes/no?
1
vote
1answer
3k views

Get clicked item ID from list

I have a list with items. Each item contains a link to another page. If a user clicks on one of those items, the specific item should get updated with a date when he clicked it. Now I get a target ...
0
votes
1answer
139 views

Displaying only duplicate items based on column value (e.g. Title)

Trying to figure out a way to Create a list of duplicate list items based on a column contained in such a list. In my example, it is the title column. First, I was thinking that I could create a ...
7
votes
1answer
575 views

When JavaScript runs

Working on an overview of all possibilities of adding JavaScript. Can someone confirm Custom Actions run after JSLinks By execution order: Page Scripts using <script> tags or scriptlink includes....
0
votes
1answer
26 views

Update SharePoint list item by column button click

I created a SharePoint list with a column having button as described here. Now, I want to update another list item by clicking on this button. The list look as above: So, when I click on the "...
0
votes
2answers
110 views

Calculating 2 weeks forward from a day, using a marker day

I am trying to code the date of the Thursday which falls two weeks after a given date. It is more complex then just adding 14 days to a given date. This is because if the first Wednesday after a ...
2
votes
1answer
832 views

ECMA script for checking active workflows for an list item

Hi i am having more than 1 workflow associated with the list if there is any workflow that is active for an item then i need to prevent starting another workflow for the same item. I am using the ...
2
votes
1answer
961 views

Remove list item permissions by role type using JSOM

I'm looking for a good way to remove all list item permissions on a certain list item of a specific role type using the JavaScript object model. With myListItem.get_roleAssignments().getByPrincipal(...
0
votes
1answer
21 views

400 error when making POST request (adding item to SP list)

I have a form that contains check boxes and input fields, and hitting the Submit button should ideally add the content values to a SP list. When I run the debugger I can see that each input (checked ...
1
vote
1answer
11 views

Is it possible to prevent editing of the address bar in SPO [closed]

I’m creating SharePoint Online ModernUI team site. I don't want the user to paste the URL directly in web blowser, so I want to prohibit editing the address bar. Is there any way?
1
vote
1answer
1k views

how to display a contacts list in accordion view?

I want to display a contacts list in SharePoint 2013 as accordion. I tried to use the code from https://code.msdn.microsoft.com/office/Client-side-rendering-code-ccdb2a0e/view/Discussions/0?...
0
votes
3answers
2k views

Can we create Excel file using c#?

I would like to know if it is a good idea to create an excel file using c# in sharepoint? I've tried to find js libraries but despite ExcelBuilder which seems really complicated to use i can't find ...
1
vote
1answer
876 views

how to create publishing page in pages library using ecma or rest in SharePoint 2010

I want to create publishing page in pages library via JSOM (ecma script) or REST api. Is there any way we can create in SharePoint 2010? Please let me know if anyone has any idea? Thanks, Rajeev K

1
2 3 4 5
103