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
votes
1answer
172 views

Calls to WebProxy without an app context are not allowed

From SharePoint 2013's default.aspx page (https://somecompany-public.sharepoint.com/pages/default.aspx) I'm trying to call a RESTful json API which lives outside the SharePoint domain, but getting ...
0
votes
1answer
580 views

How to include custom fields in clientContext.load()?

Loading some list items via var lists = web.get_lists(); var list = lists.getByTitle(listTitle); var listItems = []; for (var i in len) { listItems[i] = list.getItemById(itemIds[i]); ...
0
votes
1answer
74 views

Does JSOM offer an equivalent to SPQuery.CalendarDate?

I'm trying to get recurring items for a specific month from a list. Using the following, I can get the events for the current month: <Query> <Where> ...
0
votes
1answer
43 views

List.getItems(query) returning too many results [duplicate]

I have the below sample CAML query that I built using the SPCAMLQueryHelper: <Query> <Where> <And> <Geq> <FieldRef Name="EndDate" ...
0
votes
1answer
182 views

How to return multi-value fields via SharePoint Rest API?

After reviewing my results, I realized one of the sharepoint columns only returns one value. How do I get it to return each value from my Role Column? It should look like this: Title: FDA Program ...
0
votes
1answer
49 views

SP2010: Getting html ID from People or Group column

As I'm trying to inject Javascript into a list, I find it is difficult to get the right ID from a People or Group column. This is an example of the code it outputs: <div ...
0
votes
2answers
147 views

OpenPopUpPage to go to new URL on close

Currently my code is OpenPopUpPage('mydialogurl', RefreshPage) What do I need to change RefreshPage to be so that it moves to the new URL after my dialog closes? So far I can only get it to go to ...
0
votes
2answers
31 views

Javascript location

I am trying to create tabs using this code http://jsfiddle.net/yZYtL/ I have implimented the HTML and CSS OK but the I am unsure where the Javascript should go? I have an existing javascript in use ...
1
vote
1answer
58 views

How can I auto-populate field in add item Document Library?

I'm developing a SharePoint 2010 Foundation Farm Solution. I've created a Document Library (Attachments) with 3 custom field (A,B,C). I open a pop-up like image below with this code: function ...
1
vote
2answers
67 views

Parsing SharePoint's hyperlink format with JS

SharePoint 2010, at least, has an odd format for storing its lists' hyperlink fields on the backend, namely it uses [URL], [Description] "Well then what does it do about commas in the URL" you ...
1
vote
1answer
29 views

Select odd items in SP List, selectRowByIndex

I am trying to select odd items in SharePoint list using the following: for(var i = 0 ; i< ctx.ListData.Row.length ; i++){ if(parseInt(ctx.ListData.Row[i].ID % 2 !==0)){ SelectRowByIndex(ctx, i, ...
0
votes
1answer
46 views

Disable DataSheet view only on one specific ListView

I have setup a specific ListView with all the columns I need. I need to disable the Datasheet view on this ListView (called SubmittersList) then I need to have Datasheet view enabled on my other ...
0
votes
1answer
72 views

Specified argument was out of the range of valid values. Parameter name: index

I have the following JavaScript code which must load a TermSet from SharePoint managed metadata store. The code was working fine until Monday and suddenly stopped working with the error on the title. ...
0
votes
1answer
65 views

Selecting an input field on a newform.aspx path with Javascript without using jQuery

I'm looking for an object that contains the form field ids or something similar. Something similar to the _spPageContextInfo object for form fields. Anyone have an idea? EDIT: This code I'm using ...
0
votes
1answer
95 views

Sharepoint Online Javascript get calendar events using rest

Ive tried to fetch calendar events using this: _api/search/query?querytext='ContentClass:STS_ListItem_Events EventDate>10/10/2014 ...
0
votes
1answer
280 views

SharePoint 2013 custom Attach File button

I'm trying to create a custom "Attach File" button in my SharePoint 2013 New Item form. So far this is what I've done: HTML <div onclick="javascript:openpageindialog();" class="btn" ...
0
votes
2answers
134 views

Sharepoint 2010 JSOM run script under impersonated user account or elivated privilages

Secnario:I have a SharePoint list with two fields loginNme and message are stored. Based on logged in user I need to show different messages. This list has unique permissions i.e. only one particular ...
3
votes
3answers
259 views

SharePoint 2013 List View Accordion Render

We're looking to implement a Q&A section on one of our SharePoint sites. To make interaction easier on end users I've been looking for a way display list content differently. I stumbled upon an ...
0
votes
1answer
29 views

How can output Title, Email and phone from User Profiles

I found some code that outputs from user profiles and works but it only outputs Manager. How can this be changed to output Title, Email and Phone number? var managerName; $().SPServices({ ...
0
votes
1answer
32 views

SP2013 Multilinetextfield event?

When you edit text in a MultiLineTextField which allows rich text, SharePoint switches to "Format text", every time this happens our custom ribbons disappear (they are added with JavaScript). The ...
0
votes
2answers
465 views

How to retrieve files inside folder in document library using javascript

I need the code to retrieve files from folders in document library
1
vote
2answers
104 views

Sharepoint Date compare using Jquery

can anyone let me know whats wrong with following code var day = new Date(); var Today = day.getFullYear() + '-' + (day.getMonth() + 1) + '-' + day.getDate() + ' 00:00:00'; ...
0
votes
3answers
494 views

get the attachement files from REST API

I use REST API SharePoint 2013 to get the items from list: And and I want to get the Attachments Files, How can i do that? This the code : function getListItems(url, listname, query, complete, ...
0
votes
2answers
57 views

REST api Bad Request file replace

I'm using sharepoint REST api using JavaScript to replace a file in a doc library. Here is the url structure I'm using. <!-- language: lang-js --> props.webUrl + "/_api/web/lists(guid'" + ...
0
votes
0answers
82 views

100% CPU utilization on w3wp.exe for SharePoint web application

We have an SharePoint web application which is completely developed on Knockout JS,CSS and SharePoint REST Interface for accessing SharePoint List Items from client end.This application was stable for ...
0
votes
1answer
144 views

How to Sign-In with Sharepoint from the Javascript?

I used the following code to access the sharepoint from javascript var soapDataString = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' ...
0
votes
1answer
54 views

JSLink - SP not updating code

I have a .js file stored on the Site Assets library. Today I updated it (uploaded file of the same Name and replaced the old one). But the new code seemed not to work. After lot's of debugging and ...
0
votes
1answer
61 views

get items between do two date REST API [duplicate]

can i get the list of items between two date like ? var startDate. var EndDate. var queryGetDiscussion = "?$Date between(startDate, EndDate) "; Or using LT and GT.
0
votes
1answer
45 views

Custom javascript changes are overwritten by default javascript

I tried changing the background color of the left navigation list items when an item is clicked.When its clicked,it shows the effect but when the content in the page layout loads,the color is changed ...
0
votes
1answer
40 views

Can I jump to a specific div ID based on the results of a specific variable passed from another page?

I am trying to jump to a specific section on my page, but I need to do it after the document.ready has completed. When I click from page 1, information is added to the end of the URL depending on ...
0
votes
1answer
144 views

File Drag and Drop Prompt Metadata Properties Dialog

When a user drags and drops a file or files into a SharePoint libary, how can you enforce the metadata properties dialog box to prompt? I found a solution through the Enhance Document Upload by ...
-2
votes
1answer
67 views

JQuery sharepoint lookup value neighbouring column

2 columns in the Title and Another list are everything hi, it is necessary in case of a value choice from the Ttile field, in other field to add value from the Another column i.e. that it turned out ...
0
votes
3answers
367 views

Filtering Look up Columns with Javascript

I'm trying to find a way to dynamically filter a look up column on the new and edit forms in SharePoint 2013. I want to be able to get a value from the URL and use that to filter the look up ...
0
votes
0answers
62 views

OnPostRender on a hover display template

I have this code which works on a normal display template, so runs after the display template has been rendered but when I add it to a hover, it does it before the template has been rendered. Is there ...
0
votes
2answers
240 views

Run javascript after display template loaded

How can I run some JavaScript after my display template has loaded. I have tried: AddPostRenderCallback(ctx, function () { jQuery(document).ready(function () { ...
0
votes
1answer
225 views

How to get the value of the PeopleEditor in SharePoint 2013

I need to get the value of the PeopleEditor using JavaScript and jQuery. following this article : ...
0
votes
2answers
63 views

fetch of all items from a list

I have an Announcement list in SharePoint site,I need to show all announcement in homepage,I am following msdn code sample to retrieve items from the list,But only last item will be display. function ...
4
votes
2answers
475 views

Using CEWP for HTML/JS/CSS in SP2013, Why Not?

I have read that you need to use Script Editor WP instead of CEWP when embedding JavaScript into a page rather than using a Content Editor WP. In testing, it seems that CEWP works fine with ...
0
votes
1answer
176 views

Uncaught Sys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null. Parameter name: panelsCreated[1]

I am using JavaScript to pull events for the current day of the week. I am leveraging SP.Services to do this. The problem I am having seems to be the same that a lot of others have experienced ...
0
votes
1answer
61 views

Client side security trim DOM node

I know that you can apply security trimming to .aspx pages via the <SharePoint:SecurityTrimmedControl> control, but is there an equivalent way of security trimming dynamically generated DOM ...
2
votes
1answer
132 views

Unable to display CEWP 'builder' dialog on web part page: “showModalDialog” is not defined

I recently started encountering the following error when attempting to edit the source for content editor web parts (in page edit mode) on multiple pages in my site collection. Same error across ...
0
votes
1answer
48 views

JSOM context newly created id reference when creating more than one item

I am using the COM JavaScript/jQuery to get, create & update some list items. I have two lists and every time I create a new item in one list, the newly created id is something that I want to grab ...
1
vote
7answers
614 views

SP.js file not loaded in a simple JSOM example

I am creating a simple example that demonstrates client object model using javascript. I have ceated a simple JS file in Visual Studio and an aspx page using the SharePoint Designer. I have used ...
0
votes
0answers
10 views

not able to fetch term stores

I am getting this error.. Failed to load resource: the server responded with a status of 404 (NOT FOUND) The error is because of this var scriptbase = ...
1
vote
0answers
141 views

SharePoint 2013 Change default start time and end time on calendar event

We're scheduling a lot of similar events, so the start time is almost always 8:30AM and the end time is almost always 5:30PM (not necessarily on the same day). Is there any way that we can set the ...
0
votes
1answer
96 views

open links in modal view from page layout

I have found how to open any link in modal view thanks to the JS OpenPopUpPage* on publishing pages. I would like to use this also with the links I have in my page layout (created by snippets), so ...
0
votes
0answers
70 views

WOPI iframe on Sharepoint list attachments

I really like this new functionality of the SharePoint search that shows you a document preview on mouse hover. Is there any way to make the save document preview in list item? In the search it looks ...
0
votes
1answer
54 views

Run javascript code only in publish page not in edit [duplicate]

I am running some javascript code in on page but I don't want it running when I try and edit the page. How can I stop this from running in edit page and only when the page has been published
2
votes
3answers
64 views

Injecting Javascript into SP2010 List - Need to make sure I have the right ID

New to Sharepoint 2010, but not new to coding. I have created a custom list with 4 text input fields and I am trying to target one of the fields called SUID with custom Javascript to modify how the ...
1
vote
1answer
227 views

How to move/copy a document set via JavaScript CSOM

Could somebody give a JavaScript CSOM example of how to move/copy a document set from one document library to another? The document set has a derived content type with a list of metadata, and it ...