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

learn more… | top users | synonyms

1
vote
0answers
16 views

SP2013: SP.Result returns 0 when calling get_value()

Maybe it is a very simple fix for this but i have problem with retrieving the m_value from a SP.result. SP.Result {} m_value:false __proto__:Object constructor:function () customFromJson:function () ...
1
vote
2answers
33 views

How can I populate a dropdown with a SP list?

I have a SP List with data that I need to be in a dropdown list. I also need these to have specific classes. I'm trying something like the following but having no luck: $().SPServices({ ...
1
vote
1answer
45 views

Restrict user from selecting time slot if it reaches maximum number of seats

I am new to working with SP lists with jQuery. Here is my requirement : I have a InfoPath form for selecting training slot for employees. The form contains Date field and Time slots (Drop down having ...
1
vote
1answer
88 views

Get client computer name on SharePoint using JavaScript

Any idea how to get the client computer name or the client computer details within any SharePoint Site collection
0
votes
1answer
18 views

SPS2013 List page add href to existing text using Jquery?

Insert href link on existing text: abc, part of a DIV ID: wpfunc01 on a SPS2013 List page. I guess this can be achieved via Jquery. Please assist with the complete code to insert href on existing ...
1
vote
0answers
36 views

Add Div below the Input Type text

I want to show and add the existing Div right below the input type text box on Button click event. I'm using content editor web part to show the below html <div id="Div1" style="Display:None;">...
4
votes
1answer
40 views

SlideTo (a Web Part) Button in SharePoint 2013

I would like to insert a button to a SharePoint page which slides the opened site to a specific Web Part. I guess there is any solution with jQuery. To describe the problem: I have two document ...
1
vote
2answers
37 views

SharePoint 2013 custom list attachment link

I am creating custom form in jQuery and HTML5. I am using rest api for getting data. I am fetching attachment also and generating dynamic string with HTML code with jQuery. Every thing goes fine it ...
1
vote
1answer
15 views

Autheticating users from a third party application

I've got a java web-app in which I need users to create documents. These documents must be allocated in a SP 2013 server. My first idea was to use users' themselves SP sites to allocate their ...
1
vote
0answers
36 views

How can i select all field of literal control?

i am implementing literal control to bind SharePoint list data. When I select all data in Literal Control using checkbox in corner then it will select only 10 items of list instead of selecting all ...
0
votes
2answers
49 views

jQuery CAML results into jQuery DATATABLES plugin

Using the following code to extract items for a SharePoint list and display in HTML. Works great thank to all you folks here. Now I want to inject the output into the jQuery DataTables plugin but not ...
0
votes
1answer
26 views

How to embed/add jquery and bootstrap on the same page

How can you embed/add jQuery and bootstrap on the same page, at the same time? should you use the Microsoft or Google API link? I've tried to integrate these to work with bootstrap and jQuery. but ...
0
votes
1answer
60 views

Getting no REST data in SharePoint in a html file

I am trying to get some data from a REST Service Url in a html file. This works fine when i am using the code direct in my browser. But when i embedded it into my SharePoint Site it wont work. On my ...
0
votes
1answer
34 views

Add CSS Class to SharePoint Drop down Field using JQuery

i want to add css class to choice drop down filed using jquery below is code. $("input[title='fieldname']").attr('class', 'form-control') But somehow it is not working. can anyone help me ...
0
votes
1answer
66 views

Bootstrap Carousel with jQuery to query the images from Picture Library

I am having trouble having the jQuery to fetch the images from the Picture Library in SharePoint and display on bootstrap carousel. I'm very new to this functionality using jQuery and I think I am not ...
10
votes
3answers
876 views

Using jQuery $(document).ready() in JavaScript Object Model

I've been using with great success the $(document).ready(function() { FunctionName(); }); in a SharePoint WebPart code snippet to fire off COSM CAML queries using JavaScript to build various ...
0
votes
2answers
45 views

How do I add SlideToggle to Expand/Collapse script for Content Query

I have been using the following script to collapse groupings in content query web parts. In another script used for collapsing web parts, it contained a SlideToggle function. Can anyone assist me ...
0
votes
0answers
36 views

Show and hide Web Parts: How to keep Web Part opened?

I've added the script (you can see below) to my site, which hides Web Parts in standard and opens / closes them by clicking on the title. Now I have the case, that I used this code on two document ...
0
votes
1answer
25 views

JQuery check value of checkbox OnLoad

Im using SharePoint 2010 and have created a CEWP that displays fields associated with a checkbox when it is clicked and has a check. I need to check the value of the checkbox on the load as well and ...
1
vote
2answers
30 views

How to remove certain entries of context menu [(…)-Menu] using Script Editor Web Part (JavaScript, jQuery)

How can I remove certain entries of the context menu (marked in my screenshot with red border) by using Script Editor Web Part? As an example, I would like to remove the entries "Im Browser bearbeiten"...
0
votes
2answers
53 views

SharePoint Site Collection Administrators : Jquery

I have a current logged in User Id and through JQuery I want to find that whether the User Id is in site collection admins or not. $().SPServices({ operation: "GetUserInfo", userLoginName: $()....
0
votes
2answers
33 views

onclick for a function in a js file [closed]

I'm trying to call a jquery function with the onclick attribute of a button: <input type="button" id="palettebutton" value="VALIDER" onclick="getItemsToBeUpdated()"/> I can do this when my ...
0
votes
0answers
27 views

How to lock scroll bar in SharePoint after refresh

I want to resume to middle of the page where I was even after refreshing page, instead of returning to the top. How to lock scroll bar in SharePoint after refresh?
1
vote
1answer
39 views

Union Multiple Lists with Client JavaScript Object Model

I have several SP 2010 lists with the exact same columns. I would like to perform a union on the lists and display a filtered subset from this union. I tried doing it using a joined datasource in SP ...
0
votes
0answers
130 views

Color Code Gantt Chart in SP 2013

Has anyone found or written a script that adjusts the color of task bars in a Gantt view in SharePoint 2013 based on a value of the item? I've been able to successfully apply color coding to ...
1
vote
1answer
56 views

Retrieve the Item ID from the Task List Related Item column

Using JSOM, I getting all the task details which are not started. Using CAML query i got all the column values including related item column from Task list var relateditm = $(this).attr("...
1
vote
1answer
162 views

Add Back Button to Survey List in SharePoint 2013

In Survey, people can respond all the questions sequentially within one page or Add branching logic to answer one by one like wizards. Please refer the Image After creating survey with ...
0
votes
0answers
31 views

SharePoint Site needs to be refreshed to load results

Just to give you a brief background of what's happening, if we try to say search a certain keyword, the result page returns blank. We have to refresh the page for it to completely load. Also when we ...
0
votes
0answers
49 views

run external JavaScript or jQuery in sharepoint infopath form after postback

problem occur when postback on a field happen, all external js code stop working until run js code again. how can i use external JQuery code in sharepoint with infopath form in it ?
1
vote
1answer
27 views

Accordion webpart in SharePoint 2010 choppy when selected

I'm using the script (link provided) and it is working for me without having to do much. But the problem is the script is very choppy and when I select a webpart, it doesn't have the smooth effect ...
1
vote
2answers
160 views

Add JQuery to SharePoint

I want to add some global JavaScript to Sharepoint 2010. So I put JQuery to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS and my script to C:\Program Files\...
0
votes
1answer
49 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
66 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
1answer
59 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 ...
0
votes
0answers
18 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
18 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('/')+' '+...
0
votes
1answer
32 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
1answer
72 views

How can I add all contents of a dynamic html table to a SharePoint list?

So my table is 1 row where rows can be added, although it does not have unique id's for each row. I'd imagine this is the issue. $('#submitdata').click(function(){ var table = document....
1
vote
1answer
72 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 ...
3
votes
2answers
223 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
28 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',...
0
votes
1answer
110 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
0answers
40 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.
0
votes
1answer
60 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
65 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
47 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> ...
0
votes
0answers
10 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 () { $( "....
1
vote
3answers
66 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
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
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/...