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

Get user from sharepoint group and redirect

My requirement is when someone login to site and if he belong to 'owner' group it need to redirect immediately to specific site and if he belong to member group then need to navigate/redirect to same ...
1
vote
1answer
161 views

Issues with SPFilterDropdown in SPD2013

To start things, I have little knowledge beyond the basic concepts of SPD and being a newbie... What I want to accomplish is to only have certain values from another list show up in which their ...
0
votes
1answer
176 views

SharePoint 2010 Javascript JSOM creating a List View Web Part using javascript

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page ...
0
votes
1answer
77 views

Auto-populate a list column with a sequential number

I am experiencing major issues in trying to upload the package.json and sputility.jquery.json files onto our SharePoint Online 2013 site as advised in the SPSE post: ''Before beginning the ...
0
votes
1answer
135 views

Javascript and add user to Active Directory group in Sharepoint

How to add user to active directory group? How can I add user to the Active Directory by the javascript code. I have got a script which adding to Sharepoint Group, but how Could I do it with Active ...
1
vote
1answer
163 views

get_item test if null in Javascript model

I've a lookup additional column and alerting its value in Javascript as: var oPicture = oListItem.get_item("Image_x003A_People").get_lookupValue() If I dont add any data in the column it errors, ...
0
votes
1answer
86 views

How to specify columns when adding new item to list using set_item

I'm trying to add an item to a SharePoint list like so: Title | Column1 | Column2 -------+-----------+----------- title1 | 1 | a title2 | 2 | b Now lets say I want to add ...
0
votes
2answers
52 views

How to exclude more than one file name ending with vsdx or avi?

I'm able to grab the files, but haven't been successful excluding more than one file name ending with vsdx or avi. I need to exclude more than one file type. Any suggestions? <script ...
0
votes
1answer
26 views

How do I get results to open in new tab?

I've made several edits to this line, but they do not appear to be working. html = html + "< a href='" + this.LinkingUrl + target="_blank"+"'>" + this.Name $.ajax({ url: ...
1
vote
2answers
174 views

SP2013 JavaScript on custom master page sometimes not working

I'm trying to implement accordion menu for quick launch ( as in http://borderingdotnet.blogspot.com/2013/04/accordion-left-navigation-for.html ), but it behaves very weird. Sometimes it works ...
0
votes
0answers
84 views

Read xml in infopath using javascript

I want to read xml inside the infopath form. I am saving all infopath forms after submitting into a form library. Now I want to read the xml inside that. I am doing like following, $(function(){ ...
0
votes
2answers
706 views

Uncaught Error: The property or field has not been initialized (I have tried many solutions…none seem to work)

Uncaught Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. Even after explicitly including ...
0
votes
2answers
133 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
39 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
160 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
80 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
120 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
157 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
50 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
107 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
55 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
26 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
349 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
279 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
103 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
265 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
69 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
49 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
142 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
92 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
594 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 ...
1
vote
1answer
152 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
3k 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
170 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
54 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
340 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
192 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
26 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
32 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?
1
vote
0answers
90 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
519 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
231 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
230 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
566 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
218 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
1k 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
214 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
46 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
95 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 = ...