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)

0
votes
1answer
13 views

SharePoint Online sharing, NoScript Isnt enabled on the hostsite

I've created some functions that is really about sharing objects with external users via the JSOM api in SharePoint. var result = SP.Web.shareObject(ctx, urlToDocument, ...
2
votes
1answer
33 views

Call Javascript code in Custom Ribbon Action for office 365

I want to call my javascript code in custom ribbon action in SharePoint online. I tried this code. <?xml version="1.0" encoding="utf-8"?> <Elements ...
0
votes
1answer
36 views

SP.ArrayListEnumerator check if length = 0

I have one object in my code that is of type SP.ArrayListEnumerator, and I want to check if its length is 0 or not. How do I do that using JavaScript?
0
votes
1answer
23 views

Sharepoint 2013 REST Retrieve list info presave items

I have successfully retrieved a specific item using REST with SP2013. Issue is that value is populated AFTER page load hence I cannot do a comparison on PreSave event. It shows as undefined and later ...
2
votes
0answers
24 views

Replacing SOD with fetch (handling JS library dependencies - *in the future*)

Anticipating a future, I am experimenting with User Custom Actions in the new Document Library View Microsoft has so kindly provided to the First Release Office365 tenants. Since there is almost ...
0
votes
1answer
52 views

Color a cell based on content in list

I am a JavaScript and SharePoint novice. I would like to change the cell color based on contents using Client Side Rendering and JavaScript. I have had good luck with changing rows with you fine ...
0
votes
0answers
12 views

How to Dynamically Change a Value in the Column of the Current Item Through Clicking Hyperlink in Email

I have a script on Content Editor Web Part that me and my coworker tested on a list called TextTestList. The requirement is: When user clicks a hyperlink in email, received from a Workflow, that ...
2
votes
5answers
1k views

SharePoint 2013 Drag and Drop Uploader 'drop here' box placement

I've been working on a SharePoint site that's been custom branded and run in to an issue with the drag and drop uploader in the document libraries. For reasons unknown to me, the 'Drop here...' box ...
0
votes
1answer
24 views

Can UserCustomActions run on a web only?

In a site collection there is a particular subsite where I need to apply a UserCustomAction. It will be a basic JavaScript function that prompts for acknowledgement and sets a cookie. The need to do ...
1
vote
3answers
4k views

Problems adding javascript to newform.aspx

I am having problems adding a Javascript snippet to my newform2.aspx in SharePoint Designer. I have read several submissions that state to just add it below the PlaceHolderMain in the form. But this ...
0
votes
1answer
36 views

Javascript error on navigation in related items list

I have a Display View (ListFormWebPart) of an Item with a related items list on SP2013. This related view shows 10 items per page and as standard there is the naviagation to see other items: Once I ...
0
votes
1answer
564 views

ExecuteQueryAsync not following through to the success/failure function, javascript

I've got a function that checks if a list item (setting) is true and then changes the setting which it does correctly but doesn't execute the second ExecuteQueryAsync functions. In debugging it jumps ...
2
votes
1answer
34 views

How do you create a new document in a Sharepoint Document library based on an existing content type using REST?

I have a document library with a content type called 'Letter' attached to it. The 'Letter' content type has a MS Word document template attached to it. I would like to know how, using REST, to create ...
0
votes
1answer
20 views

Why javascripts referenced in JSLink are cached by browser (max-age=31536000)?

Context Recently, I noticed that browsers cache the javascript files that have been referenced from the JSLink property of a OOB list form. Analyzing the network traffic with chrome dev tools, I can ...
0
votes
1answer
807 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
16 views

Edit Column SharePoint

So I'm changing a SharePoint column from multiple lines of text to single and I don't want to change any other data that is previously inputted already until they go back in and try to change. I'm ...
2
votes
1answer
1k 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
2answers
18 views

Using field data with javascript in SharePoint Designer

I'm having trouble calling the field data in some javascript. Basically I need: videoFilename = 'Name that user puts into Video Name field' I thought perhaps i could just add it like in a ...
0
votes
1answer
46 views

Can I do traditional web dev with Sharepoint Online?

In other words, can I use a typical IDE like WebStorm, create some HTML, Javascript and CSS, then stick it on my Sharepoint site and will it work? Here is a sample of what I'm trying: <!DOCTYPE ...
13
votes
4answers
13k views

How to avoid caching issue when using custom JavaScript and CSS deployed under _layouts?

On our farm, I'm deploying some JavaScript and CSS files under the _layouts folder. I'm then referencing them, where it's required using a <SharePoint:ScriptLink> or a ...
0
votes
2answers
3k views

Freeze Header Row

is it possible to freeze the header row in list? We add some code so the user can scroll trough the content. The code doesn't work for the header freeze. We work with Internet Explorer 10. Have ...
0
votes
1answer
25 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
0answers
19 views

check group permission with javascript

I am developing a sharepoint add-in for Office 365 and I need to check groups permissions for my site. Has anyone some ideas?
1
vote
2answers
962 views

Changing “New Item” Text

I want to change the "New Item" text into "Yeni Ekle". I viewed the source of the list from browser. Here is the part of the New Item; <a id="idHomePageNewItem" ...........> <span ...> ...
2
votes
2answers
27 views

Value does not fall within specified range error when adding folder - JSOM

I am attempting to use JSOM to add a folder to a pre-created folder within a specified library. In the code below, I have checked that all of the variables are functioning as expected - meaning the ...
2
votes
2answers
1k views

How to use SPServices search sql query - getting malformed query

I am using the SPServices javascript library to make a search request to sharepoint 2010 search. I am trying this query: queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' ...
0
votes
2answers
2k views

Upload a document in a specific folder

I would like to set a specific folder when I open the upload.aspx page to help. I tryed to look in the dll but the license of reflector is expired. UPDATED Maybe this post can help ...
0
votes
0answers
19 views

Distinct Values selection in list column using rest

I am selecting top 500 rows from the list using below REST API method. I want to select only distinct values for ESI_ProjectSeqNoLookupId column. Please explain in below code where to insert ...
1
vote
2answers
49 views

JavaScript alert in SharePoint office 365 not working

A simple JavaScript alert for script editor is not working on clicking ok. I am using sharepoint office 365.
0
votes
0answers
15 views

Dynamically display media content in pager viewer when selecting items from a list

I want to display 2 webparts - side by side - on a page. The left side is a Page Viewer web part that is linked to a panoscan image URL and the right side is a list of panoscans with a URL column. ...
1
vote
0answers
14 views

How can I script a link to a document in a Wiki page to open in the desktop client application?

I have a Wiki page which describes how to use an Excel spreadsheet, and includes a link. As the spreadsheet contains macros, I want it to always open in the desktop application, rather than Online. ...
0
votes
0answers
14 views

xmlhttprequest cannot load“URL”. No 'access-control-allow-origin' header is present [closed]

I am trying to get files from a website as blob.My code works perfectly on IE whereas on chrome the below error occurs: XMLHttpRequest cannot load http://url. No 'Access-Control-Allow-Origin' ...
2
votes
2answers
1k views

Version Conflict issue with JavaScript Client Object Model code

I'm running into an issue where I'm trying to modify a metadata field on a document within a document library. My code, will check out the document, update the metadata field and then check in the ...
0
votes
1answer
25 views

JSOM: get_lists() doesn't retrieve “Shared Documents” document library

I'm developing Sharepoint Add-ins using the Visual Studio 2015 environment. I'm using the JavaScript Object Model to develop this add-in. I want to get list of files from the Sharepoint website ...
1
vote
1answer
700 views

ClientPeoplePicker is undefined

I'm trying to get ClientPeoplePicker control with following code. function setCPP(userAccountName, controlName) { var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + ...
1
vote
1answer
2k views

Uncaught TypeError: Cannot read property 'toString' of undefined

I have implemented the jQuery UI autocomplete functionality on a input field using JSLink. It works like a charm when I test it using Internet Explorer 9, 10, 11 and Chrome. Some users are however ...
0
votes
1answer
25 views

Sharepoint 2013 Client Side Rich Text Editor saving troubles

I'm trying to get a rich text field from the DOM and save it via javascript and its Sharepoint Client Context.I have an XSL form that creates a Sharepoint Form Field with a structure that's something ...
0
votes
3answers
41 views

How i can set the “Due Date” field (on the fly) to be equal to Today date, when the “Status” dropdown list is changed to “In progress”

I am working on an issue tracking list inside SharePoint enterprise server 2013, where it contains these fields:- “Due Date” Item status Now our customer, asked us to implement this ...
0
votes
0answers
17 views

Start a workflow task and assign it with JSOM

I am trying to see if it would be possible to start an Approval or Collect Feedback workflow with JSOM. There is some documentation out there for kicking off a workflow with JSOM: ...
0
votes
1answer
56 views

How to include buttons in SharePoint list view?

I have a list in which I want to easily and quickly get an entry time and an exit time, so the best solution would be to have, for each item already created, two buttons. When clicking on it, it ...
0
votes
1answer
24 views

How to automatically populate a “publish date” to be equal to today date, when selecting an item status to be = “Published”

I have an issue tracking list inside my SharePoint 2013 enterprise server. The issue tracking have these columns:- Item status. In progress, Cancelled, Published Publish Date Duration in months End ...
0
votes
1answer
37 views

Simple clientContext.get_current throws undefined error

I have just started developing with Sharepoint Add-ins. I'm using the JavaScript API. Find below my code: 'use strict'; ExecuteOrDelayUntilScriptLoaded(getAllFiles, "sp.js"); ...
1
vote
5answers
15k views

How do I get the value of a SharePoint:FormField with javascript?

I have a form field: <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Number_x0020_1" ...
0
votes
1answer
17 views

JScript runtime error on different machine for same code

I am using 3 Update panels in my code. After changing of my Virtual Machine I am getting below mentioned JavaScript error in a pop Up: Microsoft JScript runtime error: ...
1
vote
1answer
44 views

Color Row if Date in column = Sysdate in SharePoint Foundation 2013 using CSR

I´m using a List with about 400 Rows, for each day one. Now i want to color each row where the Date is a Day of Weekend (Sat & Sun). This Part is wokring fine with this JS var statusColors = { ...
0
votes
0answers
15 views

Client People Picker difference “Share” and custom

I can't wrap my head around the difference when adding a custom client people picker, and the one that's being used in "Sharing" (/_layouts/aclinv.aspx). The peoplepicker in "Sharing" resolves new ...
1
vote
0answers
32 views

REST abstraction layer WITHOUT jQuery

I am finding myself programming stuff that someone else must have done before . https://github.com/SamDHarris/SharePointStuff https://github.com/SteveCurran/sp-rest-batch-execution ...
2
votes
1answer
642 views

REST API ItemCount on oData BCS List

I have a list generated from a BCS oData provider and I am attempting to get the number of items in the list so I can generate a $top on my request rather than bring back only the 100 item generic ...
0
votes
0answers
17 views

I have a web part which needs to communicate to built project online web part which called Basic Info

In this case I need to add a Content Editor to make a connection between my web part and Basic Info. Is there any way to communicate between web part and Basic info without any Content Editor? I'm ...
3
votes
2answers
50 views

Problems getting executeQueryAsync to work with Promise

I am busy with a piece of javascript which has problems working correctly. I am trying to work with a loop which contains an executeQueryAsync. When this one is executed it doesn't go straight to the ...