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

get site path using a group id

I have a list of groups a user is member of including the groups' name and id. Now I need to construct URLs to the sites those groups are used in. (I can assume there is 1:1 relationship between group ...
1
vote
0answers
40 views

Conditional visibility and calculated expressions for new and edit forms

We need help regarding visibility and dynamic calculated expressions inside new and edit forms (not the standard calculated fields from SharePoint). Until now we used mostly Ardevia Rich Forms for ...
1
vote
0answers
57 views

How to add Onload change event in Dropdown list

Onload of the page: 1. Change the selected value of dropdown 2. DFWP will update list I have a dropdown list connected to a DFWP for filtering. Using javascript and onload function of SharePoint, I ...
1
vote
0answers
30 views

javascript works on checkout not in check in

I am using SP2013 & giving a JavaScript on homepage but the problem is it works when the homepage is checkout as soon as I check in the script doesn't work. what might be the reason ???
1
vote
0answers
25 views

Correct usage of getListItemChangesSinceToken() in JavaScript

I'm working on a Sharepoint hosted App, that accesses List Data from the Hostweb as I outlined here: EventListener for List changes in Sharepoint Hosted app I want to use the ...
1
vote
0answers
41 views

Javascript popup

I am using the below code to create a pop for pages. When you right click and select print preview, the preview is of the page behind the pop up as well as the pop. Is it possible to just preview ...
1
vote
0answers
29 views

Change image name before uploading it to SharePoint library using Javascript or Jquery(Not Drop Zone control)

I would like to change the name of the image before uploading it to SharePoint document library. Below is the code i have written when an image is uploaded using HTML upload control. When the image is ...
1
vote
0answers
84 views

Authenticate users to SharePoint 2013 on primise from JavaScript

I am trying to connect my mobile app to on premise SharePoint 2013 server. I have followed some of the blogs on authenticating using JavaScript but all of them are explaining to connect SharePoint ...
1
vote
0answers
46 views

Trouble uploading file to Document library using REST api and JSOM

So I have been trying for the last day or so to get code right to upload a file to a newly created document library based off a custom template. Based on my research I know I am getting all of the ...
1
vote
0answers
64 views

Custom Action not showing on Site Settings pages

I have a little (crude) javascript function that should add a javascript file to every page on my site using custom actions (including the subsites via a recursive function). It seems to work well on ...
1
vote
0answers
28 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 ...
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 ...
1
vote
0answers
44 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
0answers
31 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 ...
1
vote
0answers
27 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 ...
1
vote
0answers
166 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 ...
1
vote
0answers
21 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
0answers
27 views

How to put onload events on SharePoint 2013 scriptlinks?

In my page layout, I want to load a javascript file and put a onload event on it like <script onload="console.log(this)" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> ...
1
vote
0answers
150 views

Can you connect Active Directory to SharePoint via JavaScript/ SPServices/ or SOAP?

I am trying to connect a AD to a SharePoint 2013 list form so that the SharePoint form is filled in automatically with data from the Active Directory (i.e. contact information). Is this possible? I ...
1
vote
0answers
155 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 ...
1
vote
0answers
43 views

Why getElementsByTagName() return an empty collection?

I'm using javascript inside the console of Firefox and this method does not work as well as 'getElementsByClassName()'. I specifically added class attribute to my tags in order to access. Could ...
1
vote
0answers
29 views

Why isn't CAML Query Getting Data from a Column?

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use ...
1
vote
0answers
52 views

Get the Checkbox checked status on submit button click in SP 2010 list form

Am using checkbox multichoice field in my newform.aspx and in presaveaction call am doing the below code: function PreSaveAction() { var dt3; var dt4; ...
1
vote
0answers
52 views

how to add a link to a document using rest api

Please help me in adding a "Link to a document" using rest api to document library
1
vote
0answers
20 views

How to get an Excel table's Summary property from JavaScript on the client side using the Ewa namespace

Background: The value of the Summary property corresponds to the setting of the Description box in the Alternative Text dialog box, which is displayed by right-clicking on an Excel table and then ...
1
vote
0answers
132 views

Read Video File using File Reader in JavaScript

I am using below code to upload video file in SharePoint Online video library. function RequestExecutorLoad(){ var context; var factory; var appContextSite; context = new ...
1
vote
0answers
100 views

Custom Workflow History page

I'm building a custom workflow history page which shows the history of workflow steps that we're executed (much the same like the original wrkstat.aspx page). The reason why I'm building it, is ...
1
vote
0answers
166 views

Get the current user and perform list ID lookup from result

I need to lookup the current user's login name, then use the result to get the ID of a list item that has a column containing that login name. I'm still brand new to javascript, so the code below ...
1
vote
0answers
158 views

Javascript to: get username, lookup id in list, then update list item

I have a pretty complex task I need to perform in Sharepoint, but I'm a total beginner when it comes to JavaScript! Here's what I need to do: I have a list on my site that is basically a database of ...
1
vote
0answers
17 views

Custom Follow People function from Search Site

For various reasons I need a function that follows people from "people search results". Like the Sharepoint hover has a follow link, I need the same, but I need a function that I can use on each ...
1
vote
0answers
191 views

Programmatically Edit and Programmatically Save Edited Wiki Page in Sharepoint 2013

I inserted javascript code in a Sharepoint 2013 wikipage, through Embed Code. The basic javascript code appends rows to a table, the code is var myTable= document.getElementById('myTable'); ...
1
vote
0answers
115 views

Populate multiple text boxes based upon dropdown list selection in SharePoint 2013 on prem

I have 1 main list called OnCallEscalationContacts. This list has fields such as - TechnologyTeam [dropdown], FirstContact [people picker], FirstContactPhone [text field], SecondContact [people ...
1
vote
0answers
482 views

How to retrieve webpart xml-definition programatically

I have a Custom Webpart deployed in the Site, to which I need to retrieve the XML definition programmatically using Client side object model, can anybody help? EDIT: I used the following code. ...
1
vote
0answers
122 views

Click promoted links tile to reveal another webpart

I have two sets of promoted link tiles. I've placed each set of tiles in their own webpart on a webpart page. What I would like to do is: 1. Hide the second set of tiles, and 2. Reveal the second ...
1
vote
0answers
217 views

Load javascript file on wopiframe.aspx in SharePoint Online

Is there a different way to load external javascript files on the WopiFrame.aspx / Word Online / Excel Online page? We are using SharePoint Online. I have some external javascript files load with our ...
1
vote
0answers
28 views

Sharepoint 2013 Notifications (Similar to Outlook)

I have a SharePoint 2013 on-premise intranet portal. I want to build a Notifications feature similar to the one in Office 365 or something similar. Anyone got recommendations on using 3rd libraries ...
1
vote
0answers
309 views

SharePoint 2013 set “Structural Navigation: Display only the navigation items below the current site” JavaScript

As the title says, I currently have JavaScript that sets the navigation, however it currently sets it too "Structural Navigation: Display the current site, the navigation items below the current site, ...
1
vote
0answers
157 views

SharePoint 2013 Search Center - Alternative for $includeLanguageScript?

Is there an alternative approach to loading the language resource files with $includeLanguageScript in SharePoint 2013 Search Center? Sometimes it happens that the file is not loaded fast enough, ...
1
vote
0answers
29 views

Change permission of the multiple items

I'm trying to conditionally change permission of the multiple items in SharePoint 2010 Forms Library. I've found the working code in MSDN ...
1
vote
0answers
160 views

Why is init.js using a synchronous XMLHttpRequest?

Newer version of the Chrome browser are shouting warnings when the XMLHttpRequest object is being used synchronously. We all know that we must not block the main UI thread with unnecessary synchronous ...
1
vote
0answers
99 views

JQuery does not work anymore when refresh the page SharePoint 2013

I want to change value of span by jquery (selecting by ID and CSS). The script works, but when I refresh the page, it does not work anymore. I want to change the value 0 which CSS is ...
1
vote
0answers
30 views

Add action on approve button

I want to trigger a custom javascript code when I click on the Approve button on an Approve form (during an Approval workflow). How can I do that?
1
vote
0answers
382 views

Image file corrupted upon upload via REST

I have been attempting to use REST to upload image files to SharePoint but am running into the same issue again and again. The issue is that while the image file uploads to an image library, it shows ...
1
vote
0answers
89 views

Access ADFS-provided information in CSOM

I have hit a bit of a roadblock in some recent work, and I'm not sure how to proceed. Goal: be able to access a user's first and last name in JavaScript running in a SharePoint 2013 page, through the ...
1
vote
0answers
124 views

Hide “Share With” Menu from particular sub site

I want to hide following things from particular sub site. I want to hide "Share With" menu from site actions I want to hide "Share With" menu from Ribbon for list view "Item" or "Document" tab. ...
1
vote
0answers
82 views

Javascript won't work in Chrome

I've a problem with my SharePoint-Javascript. In IE and FF it works propably fine, but in Chrome it won't work. The script is called on a refresh of the main page and auto adds some users in a ...
1
vote
0answers
39 views

structuring Javascript for sharepoint code

I have been reading many articles and going through many video tutorials, they explain almost all patterns from javascript (Module pattern, Prototype pattern, Revealing Module pattern and etc) with ...
1
vote
0answers
36 views

Close modal after form have “saved”

Im trying to trigger a page reload after my editform is done. I know that I can create a js function, "presaveitem". But this is called before the item is saved. I need to trigger some custom JS ...
1
vote
0answers
55 views

Save the Webpage content as document to Document library in SharePoint 2010

We have a requirement to save the webpage content as document (PDF/XPS/Image) to SharePoint Document library on a button click. Only client side scripts (Javascript/Jquery) are allowed to acheive ...
1
vote
0answers
290 views

Open document in edit mode via JavaScript

I run the following JavaScript to open an existing document in edit mode: url = 'https://sp.abc.com/sites/apps/Shared%20Documents/test.docx'; baseUrl = 'https://sp.abc.com/sites/apps/'; ...