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

how to get current sp user department using javascript/spservice

How to get current login user department using java script or spservices? Any idea?
0
votes
0answers
20 views

How to add 2 display form in one?

Recently I was worked with Related list and it solved lots of problem from my users in SharePoint 2013. I am wonder if I can add 2 Lists Display form in one. This is one of my users idea's and she ...
1
vote
1answer
1k views

Show persistent status bar + form to update easily

I want to keep informed the end-users of my SharePoint site of any issue or relevant informations. Naturally, I would like to do so by filling HTML elements (input and select tags). Hence displaying a ...
3
votes
3answers
390 views

Query multiple lists using javascript/CSOM

I'm about to query multiple lists using JavaScript (JSOM, SharePoint 2010). It's working when querying one list in a time, but that's annoying when I'm having lots of lists. Working example: ...
0
votes
1answer
647 views

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user's permissions on the current host web in a SharePoint hosted app, however the user is always administrator. function sharePointReady() { ...
0
votes
0answers
16 views

SharePoint App - How to Create/Populate Excel Spreadsheet Using JavaScript and List Data

I'm trying to create a Excel spreadsheet on a SharePoint app/add-in. The data that will populate it have been gathered from several SharePoint lists on the host web. Right now, I'm able to interact ...
0
votes
1answer
39 views

How to link a new implemented item in context menu with javascript?

I'm working on customizing the context menu [(...)-menu] of a document library. In line 5 of my code I'm trying to give a link to my new inserted entry of context menu, but the code seems wrong and ...
0
votes
3answers
2k views

Disable Text Entry Into Rich Text Area Using Javascript

I'm trying to make specific rich text areas within a list edit form 'read only' based upon the overall status of the list item. In order to do this I've tried to use the following: ...
1
vote
1answer
56 views

SharePoint Online JavaScript client

Is there a way to connect to SharePoint Online from Web client javascript (js-code embedded in an .aspx page). How can I authenticate ? How can I access list item objects such as library ...
0
votes
1answer
833 views

A script on this page may be busy, or It may have stopped responding

there is one webpart on page that rotate the images so i added a jquery to rotate images and its working fine but after sometime it gives error like A script on this page may be busy, or It may have ...
0
votes
0answers
11 views

SharePoint 2010 - List, make pop-up confirmation when user clicks the 'X' on the modal pop-up

I have been trying but have had no luck with this. Basically when a user goes to a list, clicks on new item, and then a modal box pops up while the background goes grey that has a grey 'x' on the top ...
0
votes
2answers
28 views

monotools and sharepoint 2013 conflict

There is a conflict between SharePoint and monotools.js . SharePoint tries to use the method: Type.registerNamespace and monotools.js register a function with the name Type as well. If you call the ...
0
votes
1answer
20 views

loading workflowservice manager from javascript giving “Invalid request” error

I have a web part page where a list view is added and need to start workflows on items in this list using java script, on click of a button. Below is the code snippet, which fails with error message ...
1
vote
1answer
37 views

Add Back Button to Survey List in SharePoint 2013

In Survey, people can respond all the questions sequentially within one page or Add branching logic to answer one by one like wizards. Please refer the Image After creating survey with ...
0
votes
0answers
33 views

SharePoint 2010 - SharePointPlus Add/Update/Delete list items baed on an HTML table

I have a list that is updated in a system. I save the list as an HTML table (the table ID is "Tracker") on the SP site. I have the table saved and updated periodically. I found the below code (It ...
0
votes
1answer
42 views

Customize Context Menu of a library with JavaScript (Script Editor Web Part)

I'm searching for a way to customize the context menu, which is opened when one clicks on the (...) of any item in any document library. Following things I would like to realize: I would like to ...
4
votes
0answers
57 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
150 views

SharePoint Online (Office 365) - AutoResolve people picker with current user and detect change in people picker value

I am trying to implement a solution in SharePoint Online by customizing the NewForm.aspx page of a out of the box Calendar List using JavaScript with the following requirements: When page loads, a ...
0
votes
1answer
5k views

How can I display checkbox or radio button choices in a Choice field vertically?

I have a list with SharePoint 2007 with a Choice column that I'd like the choices to be displayed vertically (every 2 or 3) instead of horizontally. Is there some JavaScript/jQuery I can utilize to ...
0
votes
1answer
689 views

loading multiple files from custom action with SP.ClientContext

I made a custom action that calls GetSelectedListItemAsString(). it should load the files 1 by 1 but somehow it does not load the files can somebody help me with it underneat a code snippet of the ...
0
votes
1answer
33 views

deleteObject undefined error

I'm getting this error when i'm trying to execute delete code SCRIPT5007: Unable to get property 'deleteObject' of undefined or null reference Here is my code...Not sure what is going wrong ...
0
votes
0answers
28 views

run external JavaScript or jQuery in sharepoint infopath form after postback

problem occur when postback on a field happen, all external js code stop working until run js code again. how can i use external JQuery code in sharepoint with infopath form in it ?
0
votes
2answers
33 views

Show column depending on dropdown selection - not working

Depending on dropdown column selection,. I need one of 5 columns to show and hide the others, however the code does not seem to work, what am I doing wrong? I know I'm missing something. // Execute ...
0
votes
0answers
24 views

Content of Content Editor webpart received by REST call? Is that possible?

I may have various GUIDs and paths/files in hand, but still not able to find the inner content of webpart editor via REST call. I have 1) page name and path, where Content Editor webpart is placed 2) ...
1
vote
2answers
124 views

Add JQuery to SharePoint

I want to add some global JavaScript to Sharepoint 2010. So I put JQuery to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS and my script to C:\Program ...
0
votes
1answer
23 views

Open attachments in new tab issue

I am trying to open list item attachments in a new tab (when user clicks on an attachment in display form) I am using this piece of jQuery/javascript in my custom display form to do that: ...
0
votes
1answer
26 views

How to have number of chosen Lookup field in another list?

I am working on SharePoint 2013 Enterprise. I am looking for a functionality so I can sum item chosen in a list. As an example I have a list call Bus which is the parent list. The second list is the ...
3
votes
1answer
1k views

Get selected items from JavaScript in the document library view

I have a page in which I have placed XsltListView web part to show the view of the picture library. Above that view I have placed a link using Content Editor Web Part which redirects to other web ...
0
votes
1answer
1k views

SPService GetListItems with CAML : can't get the example to work with status giving error

I am new to SPServices and trying start with example GetListItems. Below is my code $(document).ready(function() { GetTasks(); }); function GetTasks() { var method = "GetListItems"; ...
1
vote
5answers
671 views

How to get People Picker ID using Javascript

Hi is there any way to get the People Picker value using Jquery / JavaScript? Currently we use title tag to get the id of our input fields values but people picker has only one generic title field ...
0
votes
1answer
45 views

Pull Data from SharePoint List using JS and converting it into HTML in the following format?

I was wondering how to use JS in order to pull Data from a SP2013 list convert it into HTML using the following structure below. For example: The List fields are as follows: Title Date Image Body ...
0
votes
2answers
935 views

How to check if a list item exists or not in SharePoint 2013 using javascript

I have created one custom form and insert data into one list.I want to check before data insert into the list if the data exists in list or not .
2
votes
3answers
313 views

Loading javascript after all the rest calls are finished on the sharepoint page

Environment: SP 2013 on prem, team site with publishing feature enabled I want to call my javascript after the complete page is loaded. The page has some webparts that have some rest calls. So I want ...
2
votes
6answers
2k 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
16 views

SharePoint 2010: Add GroupBy to existing list view using JSOM?

Is it possible to modify an existing view, more specific adding GroupBy, using JavaScript / JSOM? I am creating the library using JavaScript and I'd like to add a GroupBy in the "all items" default ...
2
votes
2answers
668 views

List Item file attachment using ECMAScript Object Model

How to simply upload & attach file to listItem using Javascript? And how to get/download attachments.
3
votes
1answer
35 views

Is there a way to only load javascript based on the authenticated or anonymous user?

We have several page layouts that are calling a javascript file and we are trying to improve our page speeds and we figured we only need to call this js file if the user is logged in. Otherwise for ...
2
votes
3answers
852 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
1
vote
2answers
757 views

Can I change the display name of column in a listview using JSlink

I've a requirement to change the display name of a column in only one view, I've to show 'Responsible' instead of 'Responsible Person'. Is this possible by JSlink ?
6
votes
3answers
4k views

Updating a Property w/ 2013 REST Api

I have a SharePoint Hosted App that is successfully able to add Read and Create files on the Host site (using the REST API and SP.RequestExecutor). Now I am trying to figure out how to update ...
9
votes
2answers
8k views

SharePoint 2013 REST - Create list item with user field and lookup field

I'm trying to add an SPListItem to an SPList via REST, but have a problem with User or Group and Lookup (information already on this site). function adddullitem() { var item = { ...
0
votes
2answers
69 views

How to add an default Image to SharePoint list item?

I have a column named photo How can I add a default image in a list item, which in my case is photo? for example If a user does not have the proper image for an item, or if he forget to add image. ...
0
votes
1answer
16 views

Looping through CQWP li's

I have a CQWP that executes the following JS: var projectstartdt = $(".hiddenProjectStartDate").html().split(/\-|\s/); var ProjectStart = new Date(projectstartdt.slice(0,3).join('/')+' ...
0
votes
1answer
23 views

Javascript help with retrieving data from list SP2010

I would like to retrieve data from a list that has 2 columns but 4 fields. Ex. I need the calculation from monthly & yearly cost from group 1 and calculations for monthly cost & yearly cost ...
0
votes
1answer
25 views

Java Script With Sharepoint Designer 2013

How can I Implement the following : I Created Custom Edit Form for my custom List with tow field ( title , checkedIn ), when you click save button i want to show alert message (yes/No) , if You choose ...
0
votes
1answer
21 views

How to check page layout from javascript of current page in sharepoint 2013?

Does anyone know how to check page layout from javascript of current page in sharepoint 2013? Ideally I would prefer to not use any ajax calls. Thanks
1
vote
0answers
67 views

SharePoint 2010: 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 ...
12
votes
5answers
56k views

Get current user in Client Object Model with javascript?

var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); ctx.load(web); var user = web.get_currentUser(); alert(user); I used above code to get the current user using JavaScript, but I ...
4
votes
6answers
23k views

get the login name of the current user using javascript

var context = new SP.ClientContext.get_current(); this.website = context.get_web(); this.currentUser = website.get_currentUser(); alert(currentUser); i tried this code, but i got an ...
0
votes
1answer
51 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: ...