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
0answers
8 views

Use JavaScript to Create Document Library List Item from Content Type

I have two document Content Types with a Document Template attached. The Document Template has quick parts (document properties) that reference back to fields in the content type. We are required to ...
1
vote
2answers
19 views

Add a Comment to Field items on a List

Basically I am attempting to replicate Excel's ability to add a comment to an item on a list. (The little popup boxes that can be added to Excel cells that come up with a mouse hover or click) I would ...
0
votes
1answer
29 views

SharePoint Query string filter not working with space

I am creating a url that looks like this: "http://servername/sites/mywebsite/sitespages/page.aspx?ProcessName=my initial process" But when I redirect sharepoint to that page using: ...
0
votes
4answers
36 views

Hide empty columns in view

its possible to hide empty column(s) from view(webpart) in Sharepoint 2013? I was looking for any javasript solution, but unfortunately i have found only solution for boxed style. Hide columns from ...
6
votes
2answers
5k views

How to get file or list item icon in SharePoint 2013 using javascript

My requirement is i have to display files from document library with images using javascript object model or spservices. pls let me now is there a way.
0
votes
1answer
14 views

How do I insert the referring page URL into list column in SP2010?

I have a feedback form (newform.aspx) which will be linked to from many different collaboration sites in SP2010 site collection. I would like to capture the referring page and insert it into the form. ...
0
votes
0answers
22 views

How to give group visitors permission to run custom JS?

I have a custom JS file located in siteassets in the homesite https://companyxxx.sharepoint.com/SiteAssets/scripts/custom.js I have added this JS file in the masterpage of one of my collections and ...
1
vote
1answer
699 views

400 (Bad Request) ERROR while trying to use JS files in Content Editor Web Part

So, I added some code in Content Editor Web Part and code is started like this: <script src="/<MyURL>/_layouts/15/SP.Runtime.js" type="text/javascript"></script> <script ...
-1
votes
0answers
24 views

results property not defined in $.each(data.d.results, function(index, item) [on hold]

var qString= null; qString = getdetails(); $( document ).ready(function() { if(qString != null) { getMyListDetails(); getAdminValue(); } }); function getMyListDetails (){ try{ $.ajax({ url: ...
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
38 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
44 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
26 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 ...
4
votes
0answers
32 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
57 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
14 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
25 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
566 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
36 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
24 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
809 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
19 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
47 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
963 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
28 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
51 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
26 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
706 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
28 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 ...