An open-source, cross-platform JavaScript library, now endorsed by Microsoft

learn more… | top users | synonyms

0
votes
1answer
34 views

Open attachments in new tab issue

I am trying to open list item attachments in a new tab (when user clicks on an attachment in display form) I am using this piece of jQuery/javascript in my custom display form to do that: $(document)...
0
votes
2answers
58 views

Best Javascript Grid for SharePoint REST returning data

I've managed to write jQuery code that returns the data for a SharePoint doc library. is there a best method or a clean framework to render that returning json data as a grid that look pretty close ...
0
votes
0answers
16 views

How to get filter data in sharePoint lookup field

I have a lookup field in List A which get data from list B. list B has one more field YES/NO . so i wrote a CAML Query which gives the filtered data depending on this YES/NO , how can i show my query ...
0
votes
1answer
55 views

Pull Data from SharePoint List using JS and converting it into HTML in the following format?

I was wondering how to use JS in order to pull Data from a SP2013 list convert it into HTML using the following structure below. For example: The List fields are as follows: Title Date Image Body ...
2
votes
3answers
887 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
0
votes
1answer
79 views

SPServices $().SPServices.SPFindPeoplePicker not working for required field

I am using SharePoint 2010 and SPServices to get values from people picker in custom field. It is working fine but not fetching data for required fields. can anyone help me with this. var PP = $()....
0
votes
1answer
16 views

Looping through CQWP li's

I have a CQWP that executes the following JS: var projectstartdt = $(".hiddenProjectStartDate").html().split(/\-|\s/); var ProjectStart = new Date(projectstartdt.slice(0,3).join('/')+' '+...
1
vote
3answers
59 views

CSOM error with SP.SOD.executeFunc used twice

I'm trying to do several CSOM requests. But I can't do it. Here is my first, that works alone : var collListItemToBeUpdatedRevente = ""; var enumeratorRevente; var ...
0
votes
2answers
402 views

JQuery to execute on change of taxonomy field

I am trying to find a way to auto populate some values whenever I detect a change in taxonomy selection (ClientPeoplePicker control), how can I achieve this using jquery? This is what I currently ...
0
votes
1answer
31 views

Javacript with MDS loads each way only one time

i like to do a simple javascript execution with MDS and without MDS. To do this, I have used this Javacript only executed on first page load HowTo to get work. The Problem i have, is that the script ...
0
votes
4answers
1k views

Two jquery webparts on same page. one not working

I have two web parts that use jquery on the same page. this causes one of them not to work. One of them is an actual web part with a reference to ~SiteCollection/Style Library/NewsTicker/Scripts/...
4
votes
3answers
7k views

How to get ClientPeoplePicker value using javascript

can anyone please tell me, How to get ClientPeoplePicker value using javascript.?
1
vote
1answer
51 views

SharePoint JSOM and Promises - copying items from one list to another

I need to use JSOM to copy a set of items (found from a CAML query) from one SharePoint list to another. I'm pretty experienced doing this type of thing on the server side, but relatively new with it ...
0
votes
2answers
59 views

Display Profile Image, Can't Select Picture Url

I am attempting to retrieve some profile properties for the current user, and am having a hard time with the profile picture Url specifically. Version is Sharepoint Foundation 2013. When I open the ...
3
votes
2answers
201 views

Display online users (SPO)

I have a requirement for SharePoint Online users to see what other users are currently online. Is there a way to achieve this with client-side code? Javascript/jQuery?
0
votes
0answers
26 views

Problem with the code. Not entering Sp.SOD block

Below code doesn't work as expected. it doesn't throw any error though.What could be the problem? var clientContext; $(document).ready(function () { try { //SP.SOD.executeFunc('sp.js',...
1
vote
1answer
158 views

Using html2Canvas API to generate images of custom aspx pages

So I have an html table I'd like to convert to an image and I found a pretty neat API to do exactly this. It's called html2canvas. I have been able to use it pretty easily using HTML pages in my ...
0
votes
0answers
34 views

updating web parts URL dynamically through jquery

Hi, I am adding multiple Page Viewer Web Parts on a Page. I want to change the URL behind these Web Parts through drop down menu. how can i do this.
1
vote
1answer
34 views

Get Video Source from variable

I am currently using SharePoint to query a pages library for a video, the aim is to then display this video in an iframe, I am currently using csom to get the video source from a Page, however this ...
0
votes
1answer
55 views

Add current user (read) to contributor permission group on page load

I want to add current user(read) to contributor permission group on page load but below code is alerting 'undefined': var user; var spGroup; function AddUserToSharePointGroup() { var clientContext = ...
0
votes
0answers
45 views

Change URL link of Page viewer web-part through jquery

I am using a Page Viewer Web Part of a calendar view. One challenge i am facing is to add different links in WebPart of different month views. How can i change the Parameters in URL of Page Viewer Web ...
0
votes
2answers
45 views

update list code doesn't seem to working

I am trying to update to update list when user clicks on "Edit" button but below code doesn't seem to be working.. <h1 align="center">DemoList</h1> <table id="maintable"> <tr> ...
13
votes
4answers
9k views

jQuery accordion for the Quick Launch menu?

Is it possible to turn the left side menu (I think it's the Quick Launch area) into a jQuery Accordion style menu in SharePoint 2010? The jQuery UI Accordion control uses DIV tags, so wasn't sure if ...
0
votes
0answers
9 views

jQuery toggleClass in Display Template

I have a display template that I'm attempting to have an accordion effect on. I have used this in the past (but not with display templates): AddPostRenderCallback(ctx, function () { $( "....
0
votes
0answers
21 views

Unable to get property 'results' of undefined or null reference [duplicate]

function onSuccess(data){ var title, department = null; $.each(data.d.results, function(index, item){ try{ title = item.Title; ...
0
votes
2answers
45 views

How to retrieve image description using REST API to use in a webpart?

I want to create a Webpart as image slider which contains the images from an image gallery. I want to show each image's description under it in the image slider. But have some problems regarding that: ...
0
votes
0answers
17 views

using rest and ajax , i need to get admin field,which has creator name [duplicate]

qString= null; var qString = getdetails(); $( document ).ready(function() { if(qString != null) { $.ajax({ url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/...
0
votes
2answers
67 views

move list element to another list with Jquery

I have two lists and I would like to move a list item to another list on a webpart button click. Is there a way to move items using jquery in sharepoint? Thanks.
0
votes
0answers
18 views

i want list tool tab to be present on page load rather than appearing after click event

This code is working on click event but not on page load: $(document).ready(function(){ var elem = document.getElementById("MSOZoneCell_WebPartWPQ2"); if(elem != null) { ...
0
votes
0answers
30 views

Dynamically display media content in pager viewer when selecting items from a list

I want to display 2 webparts - side by side - on a page. The left side is a Page Viewer web part that is linked to a panoscan image URL and the right side is a list of panoscans with a URL column. ...
1
vote
2answers
59 views

Select 5 items with caml beginning at the fifth row

I can get the 5 first items of a list with caml : var collListItemToBeUpdated = ""; var listItemToBeUpdated = ""; var enumerator; function getItemsToBeUpdated2() //this function ...
0
votes
1answer
43 views

camlQuery rowlimit not working on a list

I'm trying to update some elements in a list with client object and caml query. It's working, my values are updated, but for all the items (around 15) even I have a rowlimit of 5 : var ...
4
votes
2answers
574 views

Get the node value using js or jquery in SharePoint Designer

<tr> <td width="25%" class="ms-vb"> <b>Inclusion:</b> </td> <td width="75%" class="ms-vb"> <xsl:value-of select="@Inclusion" /> ...
0
votes
1answer
37 views

Sharepoint 2013 Client Side Rich Text Editor saving troubles

I'm trying to get a rich text field from the DOM and save it via javascript and its Sharepoint Client Context.I have an XSL form that creates a Sharepoint Form Field with a structure that's something ...
0
votes
3answers
57 views

How i can set the “Due Date” field (on the fly) to be equal to Today date, when the “Status” dropdown list is changed to “In progress”

I am working on an issue tracking list inside SharePoint enterprise server 2013, where it contains these fields:- “Due Date” Item status Now our customer, asked us to implement this capability:...
0
votes
1answer
33 views

Cancel on modal confirmation dialog not working

I have a simple modal popup dialog launched on the "register" button of a "new element" form : $( "#...
0
votes
0answers
13 views

need to set rows into coloured bckgrnd depending on status [duplicate]

Here is my code: (function () { // Create object that have the context information about the field that we want to change it's output render var priorityFiledContext = {}; priorityFiledContext....
0
votes
1answer
48 views

Popup dialog to confirm a form

I have a list, and when I want to add an element inside, I want a popup dialog to ask me for a confirmation. If cancel is clicked, it stays on the form, awaiting a user's action on the form ; And if ...
0
votes
0answers
41 views

Get admin(user)name from list item via REST API

While retrieveing list items using ajax rest call, I am not able to get admin (user)name, this is the code qString= null; var qString = getdetails(); $( document ).ready(function() { if(qString != ...
0
votes
0answers
23 views

Not able to get “Address” field as it is rich text and multi line column.Error occured :“undefined”

{ $.ajax({ url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbyTitle('My list')/items/? $select=Address &$filter=ID eq "+qString, ...
0
votes
1answer
60 views

why my jquery is not working to validate my form? PLEASE help

I have 3 dropdowns with 3 related textboxes combo so if dropdown 1 is <> 'Yes' then textbox 1 must not be empty, if dropdown 2 is <> 'Yes' then textbox 2 must not be empty and so on. In ...
3
votes
1answer
67 views

Accessing Sharepoint 2013 list from a plain old HTML page (not on SharePoint server)

I have a STRONG need for this. I created dynamic HTML pages that use AJAX to bring in XML files from an Excel spreadsheet. I REALLY want to store the list information in SharePoint 2013 and access ...
0
votes
1answer
26 views

Get the month name using html date control

I am using HTML controls to get interact with SharePoint 2013 list And performing CRUD operations using JSOM between forms and lists My form is having HTML date control.And on the submission of it, ...
0
votes
1answer
59 views

code to get title from list and assign to txtbox..but control doesn't reaches ajax block

var qString = null ; $(document).ready(function () { try { getDetails(); } catch(e) { alert("error occured at ready method" + e.message); } }); if(qString != null) { $.ajax({ ...
0
votes
1answer
54 views

Refresh parent page after calendar event creation

I have created a new page with a default calendar webpart. Below is what I'm doing. Click New Event and the popup gets opened Fill-in the event details Click Save and the event gets saved Calendar ...
0
votes
4answers
35 views

how to get this error solved? error is saying …expected identifier in function getdetails

Below Code giving an error called "expected identifier in function getdetails" $( document ).ready(function() { qString = getdetails(); }); function getdetails( { var result = window....
4
votes
4answers
4k views

In 2013 using JavaScript how do you empty a people picker field?

In SharePoint 2013, I want to delete all existing values in a people picker field using javascript or jquery. Simply using .removeAttr('value') or .val("") does not work.
0
votes
1answer
35 views

Jquery to display formatted value in content editor

I'm completely new to jquery and by now I'm not able to use it. Can anyone help to write a piece of code, which will display single item (given ID) from the list 'CounterList', column 'Counter' to a ...
0
votes
1answer
45 views

how to refresh the page when i click the asp image button? [closed]

When i click the image button, page should refresh and show the data i tried in javascipt ,jquery but i am not getting please someone help for this.. Thanks in Advance. here is my code : roport....
0
votes
1answer
28 views

Switch list webpart view

I am looking for following solution with use of jQuery/SPdesigner: Page with some buttons on the top as a control to switch list view located below. Right now I have webparts showing different ...