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)

0
votes
2answers
15 views

Retrieve all files from all folders

I've a picture Library which contains to folders i've retrieved them by this code getListItems('myList'); function getListItems(listName) { var clientContext = SP.ClientContext.get_current(); var ...
0
votes
2answers
18 views

How do I handle Multi Select Fields using Rest API?

A couple of my rows are Multi Select Rows. When I make this call nothing returns for that row. How do would I handle the multi-value field? <script type="text/javascript"> $.ajax({ ...
0
votes
0answers
18 views

Access denied while calling external URL ajax call

I got the access denied error when i am calling external URL from Ajax call. it is working fine without SharePoint 2010. <script> function httpGet(theUrl) { debugger; var ...
0
votes
1answer
30 views

Updating a list item using date() function

I have a column [ScheduleTime] which is a DateTime type in my List. Using JavaScript i need to update the [ScheduleTime] column which should be Current Day whenever my script loads. But here I need to ...
0
votes
1answer
12 views

How to pull data fields from Document Sets within an Asset Library?

I have an Asset Library with document sets, that I need to pull data from. I'm able to pull data from using the following code, but not sure how to get and enumerate data from the associated document ...
0
votes
2answers
21 views

How to set the people picker field using jquery in sharepoint 2013 to current user

I was able to set the current user to people picker field in SharePoint 2010,but now i am new to SharePoint 2013 . Please tell me how to set the current user value to that filed. In SharePoint 2010- ...
0
votes
2answers
30 views

How can I call a custom JavaScript function after a form has validated?

I have a form for submitting events to our calendar. What I want is to call a function once the form has validated. Something like this: User edits item User clicks save button Form validates ...
0
votes
0answers
12 views

Sharepoint Survey List Question (OOTB) Column needs character limit

When a survey is entered with one question displaying in the Box On Home Page , there needs to be a character limit so that the box doesn't stretch so far as to go into other web parts and the footer. ...
0
votes
0answers
8 views

zoom out Grantt chart SharePoint 2013 through Javascript

I would like to zoom out SharePoint 2013 Grantt Chart so that it only shows month in scale. I have seen few examples which shows the same thing but none of them is working for me. ...
1
vote
1answer
33 views

js link group count list SharePoint 2013

(function () { var itemCtx = {}; itemCtx.Templates = {}; itemCtx.Templates.Group = GroupOverride; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(itemCtx); })(); function ...
1
vote
2answers
27 views

How do I add custom CSS and JavaScript to the System Master Page?

I'm using Seattle for our System Master Page. This is working fine, except now I need to insert some custom JavaScript and CSS into it. How do I add custom JavaScript and CSS to the System Master ...
0
votes
2answers
20 views

javascript to deactivate a list item

I have a Picture Library. It has YES/NO column called "Activation Status". When we deactivate a image, we have to manually, un-check the Activation Status. Can we use JavaScript code to un-check ...
0
votes
0answers
13 views

Can we use jslink for builtin application pages for specific type of lists?

Can we use JSLink for built-in application pages for specific type of Lists? What possible ways we can add CSS and JS to specific out of box List application pages? May can use JSlink?
0
votes
0answers
14 views

_spFriendlyUrlPageContextInfo undefined despite using managed metadata navigation

I'm building a custom navigation solution using the JSOM in Sharepoint 2013. I need to get the navigation term corresponding to the current page and I found this question with a similar problem and ...
1
vote
2answers
27 views

JSOM List Item Field Values

This should be an easy one but for some reason the answer is escaping me. I am executing a query with joins that includes projected fields (fields from one of the joined lists) using JSOM. Using ...
0
votes
1answer
35 views

Cross SiteCollection call with JSOM not working

I got a problem and my brain says "yes you made no mistake" but it doesn't work. Here is my problem: I have a SharePoint hosted App which has "Tenant read" permissions in the App Manifest. That ...
1
vote
1answer
17 views

jQuery not being loaded from master page

I added references to jQuery and bootstrap to a master page using the <SharePoint:ScriptLink> control: <SharePoint:ScriptLink language="javascript" ...
0
votes
2answers
40 views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; ...
0
votes
1answer
22 views

how can Sharepoint Person and Group field in custom new form display person name suggestions, after typing first few characters?

As with default new form of SharePoint, person and group field allows user to enter multiple names all at once . Also, my most important concern here is that while typing user name its relevant ...
0
votes
2answers
26 views

Custom Lists - set row background color in a list depending on a column value

Starting from this example: https://code.msdn.microsoft.com/office/Client-side-rendering-code-0a786cdd I would like to set the entire row background color depending on a column value.
0
votes
3answers
42 views

pop up message without using alert()

I have created warning messages using alert but it is showing site url also,so I need to create warning message without using alert in java script
0
votes
0answers
22 views

event onclick don't work on sharepoint

I have a problem with sharepoint 2010, I created a new render (.ascx) on sharepoint to be used as a graphical screen that I needed to change. My problem is that after the last deployment, events ...
2
votes
2answers
42 views

Is there any way to retrieve a Web by title using SharePoint 2013 JSOM without using the enumerator?

I need to get a subweb with a particular title using JSOM. So far, the only way I can see to do this would be to use code similar to the following: function getStuff() { var oWebsite = ...
0
votes
1answer
20 views

SharePoint 2010 Preloader

I'm wondering if there is any possible way to add a pre-loader like jQuery plugin to SharePoint. Not like when the page is fully loaded, show a loading gif. But something similar to SharePoint dialog ...
0
votes
0answers
21 views

Webpart not functional using custom JS

So i finally finshed my dynamic sharepoint page and everything works perfectly untill I noticed that my calendar (added as a SP webpart) is not working. When i remove the JS it works again. I have no ...
0
votes
0answers
21 views

Need to show Popup showing whole content of web part [closed]

I have a webpart on SharePoint online site. I have customized the site using bootstrap3 model. I need to write customized JQuery code such that if content on webpart exceeds 4 lines, it should trim ...
0
votes
1answer
20 views

SP.ClientContext.get_current() is returning the wrong AD username?

I'm logged in as the following user myintranet\svc_q_sp_farm. The "About Me" page lists my details as svc_q_sp_farm, however the following CSOM/JavaScript code returns Sharepoint\System as the user. ...
0
votes
1answer
41 views

Style selected item row in a connected List View Web Part - SP2013

Currently, a selected item in a connected LVWP is only indicated by a filled, black diagonal arrow icon. I would like to add background color formatting for the selected item row. Note: I am not ...
0
votes
1answer
20 views

JavaScript writted via Script Editor web part does not recognize page elements

In SharePoint 2013 I added a div on a default.aspx like this: <div id="myDiv"></div> Then I added a Script Editor web part on the page, and added this JavaScript: var element = ...
0
votes
0answers
25 views

Window.frameElement.commonModalDialogClose() after Link in new Target (IE vs. Firefox)

We use modaldialog to open popups with 2 images and when you click on one of these images, a new tab opens and the modaldialog close. In IE it works, in firefox only one of them, close dialog or new ...
0
votes
2answers
62 views

Hiding Document Library columns used by JS file (JSLink)

Good day, Currently I have a "schedule" list (document library) which is used to store vessel schedules. Shedules uploaded are Excel files, which have named cells linked to custom properties in order ...
0
votes
0answers
19 views

Migration 2010 to 2013 JavaScript

When I´m doing a migration from SharePoint 2010 to 2013 (2010 Compatibility mode) I get the following error: A button click (Custom Code WebPart) at the main page is not working. When I click on the ...
0
votes
0answers
17 views

SharePoint CSWP 50 Item Limit

Would anyone be able to suggest an approach for increasing the default 50 item limit returned by a CSWP? This is for a solution that uses a custom display template to render the results out in a ...
0
votes
1answer
25 views

Executing Caml Query without ExecuteQueryAsync and “The collection has not been initialized…” Error

I have been trying to use Caml Queries to filter SharePoint lists and return the number of times that a given value is found in the SharePoint list. Here is the part of my code that I've been having ...
0
votes
2answers
65 views

How to set the value for a custom field in a list?

I am editing the script and HTML for a Content Editor web part. My code opens up a Modal Dialog when a user clicks a link on my page. In the dialog, the custom fields I've defined for the list appear. ...
-1
votes
1answer
46 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
50 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
20 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
20 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
39 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
20 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
47 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
29 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
38 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
43 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
26 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
0answers
21 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
27 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
35 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
35 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 ...