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.

learn more… | top users | synonyms (2)

1
vote
1answer
25 views

How to distinguish SharePoint 2013/2016 on-premises and SharePoint Online

Our add-in needs to execute different JavaScript code on SharePoint on premises and on SharePoint Online. There is a slight difference, but it is critical for our add-in. The add-in is a pure ...
0
votes
0answers
21 views

Find list element when page is loaded

I'm trying to get an element once page has been loaded. However when I put the code in window.onload = function () { my code }; it's not working, without window.onloadit get's the element. here's my ...
0
votes
1answer
29 views

hide edit button if column1!=draft in a list

I have a list and an edit button associated with each list item. The list contains another column called 'status'. I want to display that edit button if and only if status column value is not equals ...
0
votes
3answers
26 views

Conditional Formatting to apply color to indicate progression towards a numeric target

I'm wondering if anyone can help me with a calculate column/JS Link formula. I have a monthly performance indicator which is a count of the number of inspections I perform. There is a target number ...
0
votes
1answer
14 views

Get Content Type Name using JavaScript

I have a SharePoint 2013 on premise environment and I am currently using some JavaScript to query a pages library, however once I have queried the pages library I need to do an if statement based on ...
0
votes
0answers
16 views

Clear search without having to refresh the entire page

I've got a publishing page with the web parts: searchbox searchresults search refiners ... When I've done a search I want to clear the search box, search refiners and the search results web part ...
0
votes
1answer
44 views

SharePoint Online Custom List

I followed this guide http://www.c-sharpcorner.com/UploadFile/anavijai/angularjs-in-sharepoint-2013-part-1/ on creating an AngularJS with the use of the script editor but when I completed the code and ...
0
votes
0answers
8 views

Javascript to read tabular data in sharepoint webpage [closed]

Can java / vb script be created that reads the url of SharePoint webpage, loop through the tabular fields of the SharePoint webpage and write the data from field in word file? I would also like to ...
1
vote
0answers
30 views

Updating item in list depending on choice

I have the following code : <div> <input type="radio" id="firstAppointment" name="choose-option" value="1"> <span> Subscription1 </span> </div> <div ...
0
votes
1answer
20 views

Javascript load document libraries dynamically by parameter

So, I have asked several questions on this topic and each one resulted in a bit of progress. I believe I am now on the last step and I am not sure why this javascript doesn't work. The basic goal is ...
0
votes
1answer
19 views

Access Multiple Client Contexts in SharePoint Hosted Add-in

I'm trying to access multiple client contexts (not at the same time) of different lists. Each list is hosted on a separate site collection than the rest, and I need the context in order to access its ...
2
votes
1answer
18 views

Type is undefined: Javascript error that occurs in new environment but not the old

I am building a new VM for Development. In my Production environment I have a page that throws no errors and works correctly. However, when I try to look at this page in the new VM, I get the error "...
0
votes
1answer
36 views

HTML data to SharePoint list [closed]

I have an aspx page with JS parser which parse JSON to HTML. Can I get parsed information and load it to SharePoint list?
0
votes
1answer
32 views

Unauthorized Error using web api with REST in different site collection the add-in isn't deployed at

I'm trying to write a sharepoint 2013 add-in that reads certain list info from a bunch of site collections i get first and write into an array, however whenever i try to access any sitecollection but ...
1
vote
1answer
44 views

LinkButton onclick not working after postback

This linkbutton stops working after I do a postback. The JS will still run and will correctly return true/false. The postback that breaks this is exporting a data table to Excel. Note: this code ...
1
vote
1answer
28 views

Passing a value to a custom JSLink field type

I'm creating a custom field type for Sharepoint using the JSLink method. This field will be used in New List Item / Edit List Item forms. What I want to do is to allow a user to set a custom ...
1
vote
2answers
28 views

Create a document library or retrieve documents using JavaScript from static site

I'm confused by all integration options SharePoint offers. My business case is the following: I have a static HTML/CSS/JavaScript site hosted outside of SharePoint (so cross domains is an issue here ...
3
votes
1answer
192 views

why does this code don't work in the content-editor? (MyTasks)

I wrote a JavaScript function where I get my Tasks and Tasks from Team Space. They are supposed to look like: And this works as long as its a own HTML-site. Like tasks.html. When I try to add it to ...
0
votes
0answers
22 views

Error in updating batch list item

Here is my code: var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getByTitle('FlexMasterList'); var oListItem; var i=1; var j=0; for(i=1;i<...
1
vote
1answer
21 views

Error updating List Items

I have found this code to perform batch update function updateListItems() { var itemArray = []; var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web()....
1
vote
1answer
32 views

Error while iterating list

I tried this: var itemArray = []; var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getByTitle('FlexMasterList'); var oListItem; ...
0
votes
0answers
18 views

Display Google Analytics using API on Sharepoint Site

I'm wanting to display Google Analytics on my Sharepoint site, which acts as an internal intranet. THIS POST HERE seems to have a solution but I don't quite get it - I'm hoping for a dummies guide ...
0
votes
1answer
23 views

how to prevent duplicate values for people and group column sharepoint 2010

I've column in a list where we are adding the user name(column type = user and group). If the user is already added in the list and same user if I want to save I should get error message user already ...
0
votes
0answers
24 views

how to merge two items in a single list

In SharePoint 2010 List how to merge two item id in new item while clicking on button using JAVASCRIPT/JQUERY/SPSERVICES. For example I've List1 in this two item inserted. Now once I'll select both ...
0
votes
0answers
17 views

Can SharePoint 2016 crawler index JavaScript driven pages?

We have pages that are heavily driven by JavaScript and need to get them into the search results. Is this be possible?
0
votes
1answer
21 views

Disable Item Created By Permissions in SP2007?

I have been editing the editform.aspx for a list I manage. I used some jquery and javascript in order to hide certain fields. However there comes a point in my workflow where I need to disable the ...
0
votes
1answer
14 views

How to import table in excel to infopath form?

I have created the form template in excel. now I want to replicate the same in InfoPath.like I have created a table in excel and I want the table to import in InfoPath form. How to import selected ...
1
vote
0answers
19 views

All methods to add JavaScript to SharePoint 2010 - Online

I am working on documentation of all methods of adding JavaScript to a page I have some blanks I can not test easily, does anyone know the answers? When Office365 is configured to NOT allow Custom ...
0
votes
1answer
20 views

Site Assets Javascript file will not update

So I have the weirdest problem I have seen in SharePoint yet. So I am trying to practice using javascript and I can't figure out what is wrong with my methodology. For a background, I am trying to ...
0
votes
0answers
21 views

Auto Minify files on publishing SharePoint hosted app

I have created SharePoint Hosted app with some list, scripts and css. Now I want to minify my files. Can we automate minification of files on deploying or on publishing? Also can we apply ...
0
votes
1answer
38 views

Add java script tag inside HTML rich text editor field in SharePoint 2013

I am trying to add some Java Script/ Style inside HTML rich text editor field in SharePoint 2013, as we can add in content editor but it strips all script tags. I tried embedding script inside ...
0
votes
1answer
20 views

Sharepoint 2013 foundation – survey – How to check for the completion of a survey response?

I am using Sharepoint 2013 foundation. I have created a survey using the built-in feature of survey of Sharepoint. After a respondent has completed the survey and pressed the ‘submit’ button, I want ...
1
vote
1answer
33 views

Hiding Timeline on Task list causes full page refresh when calling manual refresh with JS

I am using JavaScript to programmatically call the _doPostback for a task listview webpart using this in my function: setTimeout("__doPostBack('ctl00$ctl39$g_7fb81f26_0047_4c65_9ed0_0c625b5bb5d2$...
1
vote
1answer
23 views

how to get the URL of parent iframe SharePoint Online

What I basically need is to get the url of the window that contains the iframe in which I'm currently with javascript, I've done almost everything I've seen on google and nothing works for me, I'm ...
0
votes
1answer
30 views

Jquery for document querying

How would one go about finding the correct JS/Jquery methods to accomplish the following? I would like to retrieve the URL parameter passed to the page(the parameter being projectCode) and then using ...
-1
votes
1answer
25 views

Need Help with SP2010 calculated or scripted field based on multiple other colums of data

In a SP2010 environment, I have a couple challenges. I have a list of records that I need to add a calculated field (we'll call this column "STATUS Ratio) for each persons record. Each record has ...
3
votes
0answers
31 views

SP.WebProxy.invoke Alternative

I'm working on a SharePoint 2013 on premises Hosted App. The app needs to get data from an external REST endpoint from a web service on another computer. I've managed to get in Javascript the SP....
3
votes
3answers
52 views

Adds filecount to Document Set title

What is then easiest way to add filecount of Document Set display I know to can do CSR with REST call to get Item count, but is the information available?
1
vote
1answer
25 views

JavaScript KeywordQuery Search {Today-30} not working

I have a kerywordquery in JS that is working but when i add {today-30} it does not. This is working: (RefinableStartDate<=Today AND RefinableEndDate>Today) It does not when I add -30 days: (...
2
votes
1answer
30 views

use/install of sp.js to call SP.Utilities.Utility.SendEmail

I believe the SharePoint server I am using has sp.js installed on it, as we can use _spPageContextInfo, but I cannot use the resource SP.Utilites.Utility.SendEmail. I.E I am getting an error, stating ...
0
votes
1answer
14 views

How to know from which View the Edit form was invoked

I want the edit form to behave differently on different list views. Therefore I have attached JavaScript to the list edit form. The problem is how can I differentiate from which view it was invoked?
0
votes
2answers
31 views

Add default value to the site column inside content type using javascript Sharepoint 2013

I am creating some site columns using javascript. And also I am creating content types. I am attaching these site columns to the content type with the <FiedRef> tag. But I want different default ...
-1
votes
3answers
49 views

Show/Hide fields in SP

The below code is JavaScript to show and hide fields. What I would like to clean up is and include fields in an array instead of individual if else statements(all Internal Fields - All External Fields)...
1
vote
1answer
26 views

Sort by Date Descending in JS Search

I have a KeywordQuery in JavaScript. The items returned are by date ascending. How can I change this to date descending? var keywordQuery = new SharePoint.Client.Search.Query.KeywordQuery(...
1
vote
2answers
32 views

JQuery add class to url when on page in current navigation menu

I'm currently using the SharePoint Web Control spnavigationmanager to create a navigation for sites that are easily configurable by going to Site Settings > Navigation and making changes there. I'm ...
1
vote
0answers
21 views

Check if a List exist with JavaScript [duplicate]

How do we properly check if a list is not null? var ctx = new SP.ClientContext(baseUrl) var targetList = ctx.get_web().get_lists().getByTitle("ListName")
0
votes
0answers
27 views

How to query the Active tasks?

Hello i query the task for the current user with a html file and the according javascript. This works and here is the code: var context = new SP.ClientContext.get_current(); var userSessionManager = ...
-1
votes
1answer
43 views

Convert String as Property

var listType = document.getElementById('ddlLists').value; "ddlLists" is an Id for a dropdown list and "listType" variable is having the selected dropdown list item as string type. i want that the "...
0
votes
1answer
36 views

JavaScript implemented in SharePoint 2010 not working in IE 11

I'm trying to get this JavaScript code (borrowed from sunnyape: https://junestime.wordpress.com/2013/02/01/add-table-of-contents-to-a-wiki-page-in-sharepoint-2010/comment-page-1/) to automatically ...
1
vote
1answer
52 views

How to change the text to bold and color in survey in SharePoint 2013

I want to get the text bold and underline and want to change some text to red color I am trying like the below code but still not changing anything <script src="/../IT/SiteAssets/jquery.min.js">...