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

How to retrieve Sharepoint List in Sharepoint App? “List does not exist at site with URL”

I have my app and my list in my site contents like so: From my app, I'd like to read, write, and manipulate the data from TestList. The contents of TestList are like so: I've been trying to ...
0
votes
1answer
31 views

Is there a way to expand and filter using a substring in the Sharepoint API?

I'd like to expand files and filter using a substring like so: Is it possible? ...
0
votes
1answer
91 views

$.getscript returning 'undefined'

I am trying to get the script found under 'Enforce Drag and Drop documents to apply metadata' to work and I am always getting an 'Undefined' error here: ...
0
votes
0answers
57 views

How to group by a column and sum its value

I have a sharepoint list. In that, there are 2 columns location and amount. I want to group the values by location and calculate the values of the column amount and show it in a field as sum. For ...
2
votes
0answers
79 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...
0
votes
1answer
71 views

How can I manage folders and files using rest api?

How do I use rest API to pull data from folders and files? Each set of files are associated to one particular folder. I'm not sure how the are associated and I need to pull certain fields associated ...
1
vote
1answer
21 views

How to create site custom field

How can i create custom fields for a site or sub site like Title and Description i've sub sites and every site has unique banner and some information i want the user will be able to add these ...
0
votes
1answer
41 views

Don't fire Javascript in Sharepoint 2013

I have got a script which count users in a group: <script> var userCollection; function start(){ var clientContext = new SP.ClientContext(); //Get all groups in site var groupCollection = ...
-3
votes
3answers
60 views

Unable to get property 'get current' of undefined or null reference

function listAllCategories() { var ctx = new SP.ClientContext(appWebUrl); var appCtxSite = new SP.AppContextSite(ctx, hostWebUrl); var web = appCtxSite.get_web(); //Get the Web var list = ...
0
votes
1answer
44 views

how to run a javascript on page load

I tried almost everything. A script count how many users are in group. I must find out how open this script on page load and upgrade reload. here is this script: <script> var userCollection; ...
0
votes
0answers
20 views

How do you expose a Custom Service Application method via JavaScript/JQuery

I've currently enabled all of our Web Service calls using Application Pages / Web Methods. It works well but I'm pretty sure that there is a lot of overhead when it comes to getting my JSON back. ...
0
votes
3answers
176 views

Java script how count users in group by javascript

How could I count how many users are in Group? How could I count by JavaScript.
2
votes
3answers
210 views

ExcuteQueryAsync functions inconvenient

Can any body explain this ? clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); it always output an Error in ...
0
votes
1answer
48 views

JavaScript to get all sites i'm follwing?

I'm looking for a way to get all the sites I'm following by using JavaScript. What's the best way to do this?
0
votes
1answer
83 views

How do I get and sort child items using rest api?

I have an asset library with managed content types, but for some reason I'm unable to get the managed content fields when I drill down to the Child level. At the moment, I'm only able to file names ...
1
vote
1answer
43 views

Seconds since item created with REST. Perhaps use server current time (clock)

I'm trying to find the most correct way to determine the amount of seconds since an item was created. My first approach is to simply diff the Created property with the browser time, e.g., ...
0
votes
2answers
32 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
72 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
65 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
148 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
70 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
2k 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
111 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
29 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
240 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
94 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
25 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
1answer
31 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
59 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
218 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
146 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
129 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
176 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
173 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
258 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
128 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
37 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
67 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
41 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
45 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
1answer
54 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
192 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
34 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
181 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
229 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
33 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
47 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
114 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
98 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
189 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 ...