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)

3
votes
1answer
24 views

add 15 days to date variable

I have the following line of code that pulls a list field date and stores it in a variable called dueDate: var dueDate = new Date(ctx.CurrentItem.ReminderDate); How do I create another variable ...
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' ...
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
0answers
6 views

Modify sharepoint document library callout

I am trying to override a sharepoint call out in a document library. So far, I was able to add a link to the footer using this javascript: SP.SOD.executeFunc("callout.js", "Callout", function () { ...
0
votes
0answers
30 views

I am having trouble with URL's using REST API in sharepoint 2013, for some reason it adds site pages and removes Document Library name

I have recently came across a problem with my code for a Document Library filter using the REST functionality. My code (below) returns all documents and folders correctly but when I open the ...
0
votes
2answers
637 views

SharePoint Online Hosted App get List Items from within app

I have a Visual Studio 2013 solution and I have been successfully able to get list items from the host web using the following JavaScript code: var context = SP.ClientContext.get_current(); ...
0
votes
1answer
22 views

How to get ClientContext in CSR?

In a document library's /Forms/AllItems.aspx, I am trying to render a column from ID to a file URL (FileLeafRef). However this line of code: clientContext = new SP.ClientContext.get_current(); ...
1
vote
1answer
800 views

ClientPeoplePicker is undefined

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

What is a “valid SharePoint user”?

I am wanting to use AJAX / SP.Utilities.EmailProperties to send an email out to a group mailbox. I have got the code to work to send emails to individuals, but am unable to send to a group mailbox. ...
0
votes
0answers
9 views

AddBehavior & navigateFrame (Open With Explorer) SP2010

I have been facing an issue with "Open With Explorer" and well, restarting WebClient service helps sometimes, restarting my PC also helps sometimes, but that is totally not handy. I have taken a very ...
0
votes
1answer
23 views

Possible to externally access Sharepoint 2013 via Javascript alone?

Is it possible to access SharePoint List Data from an external javascript sitting outside the SharePoint environment? Is there an example out there?
0
votes
1answer
47 views

How to add a button to a document library

So I want to add a button to a document library next to the other buttons (new, upload, sync, more) that acts as a link to take you to a page related to the document library. I have already put a ...
1
vote
4answers
15k views

Retrieving list items using Javascript and Caml query

Hi guys I'm new to SharePoint dev and working on a project to retrieve list items. I have followed the instructions from http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx and ...
0
votes
1answer
18 views

Getting the site collection url for 2007 to O365

I'm trying to figure out how to get the site collection url for any version of SharePoint, not sure which method would be the best I figure using window.location probably isn't reliable, ...
0
votes
1answer
20 views

How to hide elements in dialog box?

In SP-2013 on prem, I am trying to hide all elements except the one element where one can browse for pictures, like shown in this picture where I want to hide everything inside the red square. I ...
0
votes
0answers
20 views

Papa Parse and SharePoint

So, I have applied Papa Parse to a page that has a view of the list I'm working with. I have successfully read a CSV and logged it to the console. My question is, how do I update all items in my list ...
1
vote
1answer
11 views

Link to Grouping Categories

I would like to create a link that will take me directly to the grouping section in a list. This is similar to page anchors on a word document. Is this possible? Update: This is a custom list not ...
0
votes
1answer
658 views

SharePoint New and Edit Form Javascript Date Time Field

I have a custom list that contains a date time field. The client requested we trim the time portion of the field to only show two available appointment times of 8:30 am and 1:30 pm. In order to do ...
1
vote
2answers
37 views

Color code due date field

I have modified the following script to display my ReminderDate field in red if the date is past and also the feedback field is false. Before implementing this and because I am a novice in ...
8
votes
4answers
544 views

Changing date format using javascript

I am getting date in 2015-10-30T05:00:00Z format from a SharePoint list using rest. Please help me to get the date in 2015-10-30 format using JavaScript.
0
votes
1answer
28 views

Add Webpart to a Page using only Javascript?

Is it possible to add a webpart to a page using Javascript. I want to add a webpart to a specific page whenever a button is clicked.
0
votes
0answers
10 views

Hover Popups/Callouts inside SVG tag in SharePoint 2013

I am trying to add a hover popup/callout by applying the CalloutManager in an element inside a svg tag. SharePoint uses a different version o jQuery, it is implemented in a file called mquery.js. The ...
1
vote
2answers
41 views

How to modify/add columns to a default list view using JavaScript

Using a JavaScript, I create new custom lists including some new fields. After list creation, the default view shows all the added fields. But I also want the columns 'Modified', 'Editor' and ...
0
votes
0answers
14 views

How do I access a Service Application field in Central Admin using CSOM from JavaScript?

In Central Admin you go to Service Applications and you will see a list of applications. For example: Access Services 2010. When you click Access Services 2010 a list of fields is displayed as ...
0
votes
1answer
33 views

Set Welcome Page using Javascript only?

Is it possible to set the Welcome Page of a SubSite using only Javascript? I'm looking to create an Onclick Event that does this. Anything would help.
1
vote
2answers
7k views

Get list items created by logged in user with REST api

How can I get all list items created or changed by the currently logged in user with this function? What's the correct query? // Getting list items based on ODATA Query function getListItems(url, ...
0
votes
2answers
158 views

Freeze the header columns for list in SharePoint

I'm working with a piece of code that are supposed to "freeze" the header column so when user has to scroll down, the headers remain visible and the user know what he or she is looking at. I have ...
0
votes
2answers
20 views

Showing the current date in a text line on a page

I made a report page for our call desk. The page will be printed and be used by management. So preferably i have in the page on top inside a text field a script snippet to shown the date as when this ...
0
votes
0answers
9 views

sending document to record centre using JavaScript

I need to send documents inside a document library to record center using JavaScript. I have tried with officialfile.asmx without any outcome.
0
votes
0answers
32 views

OK button not working, throws JavaScript error when edit list column name

I have a custom list, when I go to its setting, edit the default "title" column, renamed it to "questions" then click OK button. The page has no response. After inspect the page with inspecting tool, ...
0
votes
0answers
19 views

Show and hide Web Parts: How to keep Web Part opened?

I've added the script (you can see below) to my site, which hides Web Parts in standard and opens / closes them by clicking on the title. Now I have the case, that I used this code on two document ...
0
votes
1answer
29 views

REST copyTo Method in SharePoint Online

I'm trying to make a copy of a MS Word document and add it to a document library in SharePoint Online with the below code, which runs once without firing the success or fail message, and throws ...
0
votes
1answer
22 views

How do you populate information from a user's AD profile to a list's field?

Basically I want to create a Staff Directory on SharePoint that auto-populates a user's location (we are multi-site), Phone Number, and Title. I am hoping to automate some of this process by pulling ...
0
votes
3answers
2k views

Add hyperlink to Sharepoint list item

I need to add a hyperlink to the Sharepoint (2013) list item in one of the columns or make the list item itself as a link. I don't know how to do this. Any help is appreciated!
1
vote
0answers
18 views

Sharepoint dashboards interaction

On a SP BI solution there are two dashboards, both interactive. The wish is when someone click on a field in the left dashboard, an action is happening in the right dashboard, that is, sorting the ...
0
votes
0answers
22 views

How to Track Silverlight video streaming length percentage in SharePoint 2013 using JavaScript

I want to track how much of a video's length is watched on Pause and Stop. How to track Silverlight video streaming length percentage (%) in SharePoint 2013 using JavaScript?
0
votes
0answers
20 views

Add custom button to Sharepoint 2013 ribbon to print

I need to create a shortcut for my client to print a document from a SharePoint library. The user needs to select a file in the library and then in the ribbon click on the custom Print button. This ...
1
vote
4answers
535 views

jQuery not working properly

In the editform.aspx of an item, I am trying to use jQuery to cause a pop up to go off anytime a field is changed (sort of silly, but once I get this to work, I plan on moving to doing more). However, ...
2
votes
1answer
715 views

Grabbing a filter value via CEWP code behind

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the ...
2
votes
1answer
28 views

Overwrite Add Document Function for Document Library in SharePoint Online

I want to hijack the call to CoreInvoke on Adding a new document for a given SharePoint online document library so I can prompt the user for some metadata and populate the Word document with it ...
2
votes
1answer
1k views

Hiding Column on a List View with Grouping

I have a list that I need to dynamically hide columns on based on user. Sort of a rudimentary Column Level security type deal. This is being done through Javascript and JQuery to simply not display ...
1
vote
1answer
675 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
2
votes
1answer
655 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
1answer
23 views

Sharepoint 2013 Foundation Native forms customize [closed]

I am new with Sharepoint but old with ASP.NET MVC. I Would like to know a better way to do: Native Forms (New and Edit) Customization, so i need to add on form change events, required field based in ...
1
vote
3answers
52 views

Errors when reading a lookup field of a list item using the JavaScript Object Model

I changed a field from being a single line of text, to being a lookup (still only displaying a single line of text, but it's fetched from another list. The field's internal name is Status. This is ...
0
votes
2answers
17 views

How to remove certain entries of context menu [(…)-Menu] using Script Editor Web Part (JavaScript, jQuery)

How can I remove certain entries of the context menu (marked in my screenshot with red border) by using Script Editor Web Part? As an example, I would like to remove the entries "Im Browser ...
1
vote
1answer
540 views

Getting displayed month as an integer from fullcalendar

I wanted to fetch the current displayed month from fullcalendar with the following code: function GetCurrentViewedMonth() { var date = $('#myCalendar').fullCalendar('getDate'); var ...
0
votes
1answer
25 views

How to skip preview-window within context menu [(…)-Menu] with JavaScript (Script Editor Web Part)

I would like to skip the preview-window (red marked in my screenshot) within the context menu [(...)-Menu] of a document in a library and go straight into the menu (which is opened when clicking in ...
0
votes
2answers
30 views

Get the Termset with Javascript and nothing return

We are working on a SharePoint 2013 on-premise farm. I am trying to return the termset object with ID 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx'. Here is my script. I add a content editor webpart and insert ...
1
vote
1answer
41 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?