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
26 views

Accessing JavaScript libraries for basic tasks

I ran into an error while trying to gain access to the required libraries for JavaScript development. I copied this code straight from Microsoft's documentation, however when it is executed on my ...
3
votes
1answer
150 views

SP.Taxonomy.js TypeError: b.get_path is not a function

I'm trying to display the terms of a site but I can't create a instance of TermSession object. context = SP.ClientContext.get_current(); var taxonomySession = ...
1
vote
1answer
52 views

Modal Dialog: How to Disable Redirect on Save

I have a wiki page with a link on it which when clicked opens a modal dialog to a document set's new form page. When the Cancel button on the modal dialog is clicked, the dialog closes, as expected. ...
1
vote
2answers
45 views

EventListener for List changes in Sharepoint Hosted app

I'm developing a sharepoint hosted Add-in, which should react to a change of a list field of a list in the hostweb. I need some kind of EventListener for a list field. For example: List field Gets ...
0
votes
1answer
114 views

Adding List view web part to a page using javascript

In a page, I need to add a list view web part when the page is loaded. Is it possible using javascript? Actual situation is that a list has a column States. It can have multiple values. So in ...
0
votes
0answers
33 views

Sharepoint 2013 - replacing links in Picture Slideshow

I'm using SP2013. The links in the OOTB Picture slideshow link directly to the image. I need to change the array that is default with some sort of script (which I'm not great with). I did find this ...
3
votes
2answers
183 views

SharePoint 2013 list using multiple drop down list as filters

Long time reader, first time poster... I have found many of the best solutions for my problems here, so thank you for all your hard work! I have been trying to get this problem figured out for few ...
1
vote
1answer
25 views

Upload documents from other websites

I want to upload documents from a ASP MVC website to my Sharepoint document library. Found a lot of websites about this topic, but most of them are focussed on uploading documents from within ...
4
votes
2answers
203 views

Disable Edit Item from the SharePoint Ribbon

In my sharepoint 2013 list dispform.aspx, I have one webpart with 'save' button . Once that save button is clicked i want to disable the 'Edit Item' OOTB option from the ribbon . How can i achieve ...
3
votes
0answers
146 views

ctx.CurrentItem undefined in new function

I am editing a item display template in SharePoint 2013. The following problem occurs: ctx.CurrentItem becomes undefined in a custom function. How can I solve this? Here is a little code snippet: ...
2
votes
1answer
49 views

Async wait till variable is set in the display template

I have a problem with excuting the script in the right order. I have a custom.js which is loaded at the top of the masterpage. The following function is included: var results; var followers; ...
1
vote
0answers
28 views

Collection has not been initialized(async)

I am trying to create with search(display templates). To return a list with only the followers. The following error is throwing when running: "Error: The collection has not been initialized. It ...
2
votes
0answers
35 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
2
votes
2answers
207 views

run external Script before CSR code is executed

How can I load a script file before the CSR is executing? Microsoft says to https://code.msdn.microsoft.com/office/Client-side-rendering-code-b2eedf92 (function () { // jQuery library is required ...
1
vote
0answers
37 views

slider.js sharepoint 2010 configuration

I am using slider.js (followed this : http://summit7systems.com/a-simple-jquery-content-slider-for-sharepoint-200720102013-and-o365/). It all works fine, but if I wanted the slides to go from 0 1 2 3 ...
1
vote
2answers
50 views

use CSOM for the GetListAndView WebService for multiple lists/views

I know how to use lists.asmx?op=GetListAndView to get list and view details. I'm trying to do the same using CSOM. And, to keep it efficient, I wanted to make one call for multiple lists/views. But ...
1
vote
0answers
30 views

SP2010 - How to stop a Jscript filtering folders

I'm on SP2010, managed by my company so unfortunately no access to server and can't add additional web parts. I previously had the need to build an A to Z filter in a library. I have used a Jscript ...
0
votes
1answer
32 views

SharePoint Online, Stripped down .aspx, requirements to access _spPageContextInfo

What is requirements to access the _spPageContextInfo object from a blank .aspx page or .html in SharePoint Online? I have a document library with a blank aspx-page and in that page I would like to ...
1
vote
0answers
26 views

SharePoint 2010 how to duplicate add document link on sharepoint list

How to duplicate add document link on a SharePoint list? I am planning to put the "add document" link both on the top and bottom of the SharePoint list as well as the "navigation link" next and ...
0
votes
0answers
27 views

Hide Droplist with Jquery

I am working with Sharepoint 2010, i am trying to hide different fields according to role of the current user. My code only works with normal text fields, but it doesn't work with drop list, so i ...
2
votes
1answer
64 views

how can i override the onclick event for events/items on a Calendar using JavaScript?

Right now when you click on an event on the calendar it selects it. I want to override that behavior. I can't seem to find what event to override. Any ideas? I know I can iterate through each ...
0
votes
0answers
37 views

SharePoint 2010 - How to add “Title” attribtue with Created By value for each reserved item in FreeBusy field table?

I searched hours on the internet, there is very few information. Reservations content type is enabled in a Calendar list in SP2010 (e.g. image1). Do you guys have any ideas/directions on how to show ...
2
votes
4answers
291 views

Create/ Delete file from SharePoint javascript without SP libraries

I'm developing an HTML page, which shows files from a certain dictionary from ths Sharepoint. In this page I want to add an option to create a new file to the dictionary. I didn't find a way to do ...
2
votes
1answer
59 views

Javascript object model says load succeeded, but object is empty?

I've got a pretty weird issue going on on a clients SharePoint 2013 environment. We're using some JSOM javascript code to retrieve details from a web. Here is a snippet of the code: function ...
1
vote
1answer
125 views

JSLink and REST API issue with async

I am trying to use REST API inside JS Link. SPClientTemplates.TemplateManager.RegisterTemplateOverrides(OverrideFieldContext); function OverrideFieldContext(ctx) { var groupingName = ...
1
vote
0answers
140 views

Rename Sharepoint 2013 document library file name using REST and JS

I am new to Sharepoint. I have a list of files in a document library. Files are placed within the year folder, followed by the sub-folder of month and the day wise sub-folders. I have a list of ...
2
votes
2answers
55 views

Best way to create a multiple item submit form

I'm looking for a way to create a form in SharePoint 2013 which will allow me to submit multiple items into a list (each line as an individual record). So, for example, i'd have a form with inputs for ...
1
vote
2answers
70 views

Cross Domain REST Calls - Always 401 before 200 received

I am attempting to create a REST call across domains (we have different farms with different domains in our organization. I am not doing this through an app, but instead I am doing it via a CEWP ...
3
votes
1answer
193 views

need to click submit/publish button on ribbon via HTML button

I have one HTML button to to submit on one custom page layout. I want to to submit or publish this page on this HTML button click. I tried with binding it with ribbon button onclick using jquery. But ...
3
votes
2answers
245 views

Does Sharepoint 2013 really have a jquery conflict with $?

I have been working on SharePoint 2013 recently, and noticed that under variation sites, SharePoint 2013 has a java script file that defines a global variable called $ which overwrites the jquery $ ...
0
votes
2answers
210 views

Approve Task from Javascript

I have the List1 which creates a Task when an item is inserted. I have to approve this task via Javascript. I found some examples, one of these: var clientContext = new ...
7
votes
2answers
168 views

What are the Type.registerNamespace advantages over standard JavaScript methods?

Now I dive deeper into the world of .Net developers I notice more and more Microsoft ways of doing things unfamilair to me as a (once LiveScript) JavaScript developer. I see PnP and other blogs ...
1
vote
3answers
25 views

Same solution displays different links on different servers

I created a farm solution. One of the webparts retrieves data from internal rootsite. <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script> In the test ...
0
votes
1answer
32 views

Converting symbol to string

var TitleVal = encodeURIComponent($("[title='Title Required Field']").val()); // Title has value "car & bus" //decodeURIComponent(TitleVal); var allOptions = ...
0
votes
0answers
35 views

Javascript calls a web service using Ajax and returns custom error message

The code is using a Javascript calling a web service using Ajax. jQuery.support.cors = true; $.ajax({ url: url, data: { format: 'json' }, error: function() { ...
0
votes
0answers
37 views

SP services to filter list form web part

I have a project requirement where I need to filter the column value based on current logged in user. This needs to be done in Designer using either Javascript/Jquery or SP Services. NOTE: The ...
0
votes
1answer
62 views

Upload JS file on asset library

We have a SharePoint 2013 enviroment were we are unable to upload JS file to a an asset library from client machine, while it work ok if we upload from inside the server. How can we resolve the ...
0
votes
2answers
123 views

Javascript/CSS File Not Loading But is on the page! SharePoint 2013

I am able to see the the javascript files and css files in the code from the F12 Developer tools but the scripts/CSS files only load when i am logged in the Anonymous User it does not load. Is there ...
1
vote
1answer
47 views

get_lists results in access denied

I am using the code below to get all the list of a site. However the user might not have access to all lists, so how can I get only the list the current user has access to? When accessing the site ...
1
vote
2answers
312 views

Can I run javascript based d3js.org on Sharepoint?

I'd like to try using D3.js and have access to microsoft hosted SharePoint sites. Is this possible? Where do I start on the Sharepoint side? Specifically, where can I put the .js files and the ...
0
votes
1answer
247 views

how can I collapse all groups in a sharepoint list upon page load

How can I go about collapsing all groups in a sharepoint list upon page load? I tried putting the following in a script editor web part (based on this page ...
0
votes
0answers
25 views

Why Sharepoint call resize function on page load?

I have a JavaScript in my WebPart with a resize function, which should only be called, when the window is resizing. But the function will also be called, when i make a refresh. Does anybody know, why ...
0
votes
1answer
38 views

Changing form select value from query string

I'm really struggling with this - have found a number of 'almost' answers but I cant quite get there! I have a form with a select field (EventID) (This is a lookup from another table) that I want to ...
0
votes
1answer
231 views

Hide fields until a value in a radio button is selected

My requirement is that i have a radio button on a New Item form with the values of Yes/No. If No is selected, i need to be able to have 10 fields appear (single line of text) so that the end user can ...
0
votes
0answers
24 views

Correlation Error in Sharepoint Online app

I am trying to change an app to apply a custom action recursively to every subsite of a site collection. The code segment for that is below. I keep however getting the following error: Something ...
1
vote
0answers
20 views

unable to use getElementsByTagNameNS with a JavaScript SOAP 1.2 call to lists.asmx

For reasons I do not understand, even though the call is successful and I get data back, I cannot retrieve nodes using getElementsByTagNameNS on xhr.responseXML when using SOAP 1.2 calls. Hopefully ...
1
vote
1answer
28 views

Trouble adding Breadcrumb settings to Master Site

I need to add the 'Breadcrumb' file path into our new Sharepoint Online. I am totally inexperienced with configuring Sharepoint. I found a piece of JavaScript code from here I've added it to the ...
11
votes
2answers
410 views

Sharepoint 2013 - show ribbon to admin only

Is there a tutorial or specific bit of code I can use to hide the ribbon for all users except admins or a user group? This needs to be for sharepoint 2013 (rather than 2010) Can anyone help please?
0
votes
1answer
93 views

SharePoint 2013 JS Automatically Generate and Send Email on New Item Form Save

Here is a screenshot containing the references below: BACKGROUND (the numbers correspond with the items in the screenshot) The 'Add New Item' button is pressed, which causes the 'New Item Form' ...
0
votes
0answers
18 views

Unable to retrieve the properties ' selectLayout ' null reference or undefined

Ssometimes I have problems when I have to add an item or a complete change from a list previously created . In these cases it happens that the ribbon is unusable and the javascript error returned is ...