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

learn more… | top users | synonyms

1
vote
2answers
22 views

How to get the return value from SP.SOD.executeFunc?

I have the same scenario as what this below question has: How to get the return value of an on demand executed function? I have SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getPageTitle); ...
2
votes
1answer
1k views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
4
votes
2answers
630 views

Bootstrap in HTML Web Part

I got HTML/CSS from our Designer to implement on a Sharepoint 2010 page. This page is using bootstrap. I implemented it with HTML Web Part and also tried to split the web page layout and work ...
0
votes
0answers
16 views

I've added people picker and I want to add its values to column in a list

I have a column of type group or people. I've implemented people picker on aspx page using jQuery. I want to add picked users to my column in list my code is: $(document).ready(function () { // ...
1
vote
3answers
46 views

My jQuery code is not kicking off in DisplayForm in SharePoint

I have added some jQuery code to the DisplayForm as follow- <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1....
1
vote
0answers
18 views

Dynamic Display Template Menu

I have a video library with a Category, Chapter, Section and Title Column. Content Type | Name | Category | Chapter | Section Video | Video 1 | A | 1 - Getting to Know A | 1....
0
votes
0answers
23 views

REST API / People Search Results

In my people search results I am querying the REST api to get a link to each person's CV, which are all held in a single document library. I am returning the correct results, but rather than one CV ...
1
vote
2answers
2k views

how to access input element in parent from inside iframe in sharepoint

I have the following jquery code and I have inserted it in an html page where I call it inside an iframe in a SharePoint page. I am using this line of code to get the id from the control in the parent ...
-1
votes
0answers
30 views

“[object Object]” is alerted when I try to check whether my admin field contain value or not [duplicate]

User recieves an alert box with text as [Object Object] on the screen when he runs the below function. What could be the possible reason for it and how to avoid it. function PreSaveAction() { var ...
-1
votes
2answers
58 views

people picker and rich text box field not function well under presave. alert box pops up even there is info provided

function PreSaveAction(){ var ITOwnerField = $("#ctl00_ctl41_g_648c8386_16ca_4729_9c59_c9757150bafe_ff41_ctl00_ctl00_UserField_upLevelDiv"); SP.SOD.executeFunc('sp.js', 'SP.ClientContext', ...
6
votes
3answers
528 views

Hide options from ECB Menu in SharePoint 2013 Library

I have added a document in a document library. I am trying to hide an option from ECB Menu How do you hide any options from ECB Menu? Update: Each item has a column "x" with different values. So, ...
3
votes
3answers
2k views

Sharepoint custom list: Hiding and showing column based on drop down dependancy

I'm trying to add javascript to the dispform.aspx page of my form to hide certain columns/fields based on a dropdown menu. When I add the code to the CEWP it simply adds text above the fields; the ...
0
votes
1answer
1k views

SPServices SPGetLastItem returns last id for current user

The function SPGetLastItem from SPServices returns last id for items that only the current user has created. I want a function that returns the last id for any user.
3
votes
1answer
1k views

Hiding Column on a List View with Grouping

I have a list that I need to dynamically hide columns on based on user. Sort of a rudimentary Column Level security type deal. This is being done through Javascript and JQuery to simply not display ...
-1
votes
0answers
21 views

i am using following code on IE console to check is any checkbox is checked or not. addition 'undefined' coming [closed]

var a = $('#PIIDataId input:checked').length > 0 console.log(a); //it gives o/p as "undefined (nextline) true"
1
vote
2answers
26 views

Is this the proper querying method for SP2013?

I'm having issues trying to load the proper script below to become a customized image rotator on my SharePoint 2013 platform. Can anyone help please? I want to know if I am writing the code properly......
0
votes
2answers
27 views

Jquery to insert total of a column onto another column in SPS2013?

Please suggest the way to get Jquery to perform total of the numeric value in column 1 and insert the output on column 2 in SharePoint 2013 List?
0
votes
1answer
62 views

SP 2013 - JQUERY to check the value of a choice type field

Im hoping someone could supply me the proper SHAREPOINT SYNTAX to use in JQUERY code to check what the value of a SHAREPPOIINT CHOICE TYPE field. I thought I needed to check a checkbox type field so ...
1
vote
1answer
58 views

Registration form/Auto fill list - Sharepoint 2013

I'm working with SharePoint 2013 and SharePoint designer 2013. I DON'T HAVE INFOPATH. I have 2 lists, one is a training calendar and the other one is for registration to these training. Here's the ...
0
votes
0answers
24 views

Querying Lists in 2013 via Javascript and JQuery [closed]

I'm having issues trying to load the proper script below to become a customized image rotator on my SharePoint 2013 platform. Can anyone help please? I am using Cycle as my jQuery base I have ...
0
votes
3answers
41 views

presave function not working for multiple fields

var j = jQuery.noConflict(); function PreSaveAction() { var txtTitle = $("#ctl00_ctl41_g_648c8386_16ca_4729_9c59_c9757150bafe_ff21_ctl00_ctl00_TextField").val(); //Application Name //...
-1
votes
0answers
22 views

extra “undefined” is coming with defined output [closed]

var count = 0; $("#PIIDataId").find("span.ms-RadioText > input").each(function() { if($(this).prop("checked")) { count += 1; } }); console.log(count);
0
votes
2answers
45 views

SharePoint Context and Caml query is not working

Here is my code.. var CmalQuery=""; var fieldName=""; $(document).ready(function () { $('#btnSearch').on('click', function () { txtValue = $('#txtSearch').val(); fn(); }); ...
1
vote
1answer
982 views

Jquery is not loading properly in Internet explorer 11 browser until page refresh

Im using this jquery plugin called Slidorion with SPServices. On firefix,Chrome when the page loads first it works all good. But in IE 11 it doesnt work on first load until i refresh it. I have ...
-1
votes
1answer
30 views

I want numeric count for checked box but i am getting array of values [closed]

$("#UserOrgId").find("span.ms-RadioText > input").each(function() { console.log($(this).prop('checked')); } ) //Provides me 23 rows with true false value but i want count of trues only i.e....
0
votes
2answers
39 views

Fetch User Details in SharePoint 2010

I have a requirement to fetch user details in SharePoint 2010. Just like SharePoint 2013, are there any web services available which can used in JavaScript Code? I need to fetch user details that ...
0
votes
1answer
967 views

How can I make links in the left navigation open in a new tab?

I'm trying to make two links on the left navigation open up into a new tab as they are external sites. It should be as easy as adding target="_blank" to their HTML element but when I wrote some jQuery ...
0
votes
0answers
34 views

I need jQuery code for situation : “I hv 10 checkboxes ,out of which user must select more than 2 checkbox” [closed]

var txtTitle1 = $("#ctl00_ctl41_g_648c8386_16ca_4729_9c59_c9757150bafe_ff311_ctl00_ctl00").is(':checked')?1:0; var n = $('input:checked').length; var j = if(n <= 1)? 1:0;
0
votes
0answers
30 views

Jquery to copy specific data and insert it in a specific blank field in SPS 2013 List

Is it possible using JQUERY in SharePoint 2013 Enterprise (On Premise) to copy read only specific data flashing on a SharePoint 2013 List and insert it on a blank field on the same SPS 2013 List?
1
vote
1answer
788 views

Force PDF to open in new window/tab

I am using SharePoint Foundation 2010 and attempting to have my PDFs open in a new tab or window. I have been able to get this to work from document libraries by using jQuery. You can see this code ...
0
votes
2answers
2k views

Sharepoint 2013 Rest API _api/Web/SiteUserInfoList filter Name

I have some trouble to use the Sharepoint2013 Rest API _api/Web/SiteUserInfoList. I need to use a $filter on the Name. I get always a 400 Bad Request. This is my endopoint rest ....my_site.../_api/...
0
votes
1answer
626 views

Retrieve SP-List data cross domain via SPServices?

I am trying to retrieve data from a SharePoint List hosted in a different server/domain. We are still running SP 2010 but about to migrate to 2013. I am not sure if jQuery.SPServices and CORS are the ...
2
votes
1answer
2k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
0
votes
5answers
10k views

Jquery to get list items from SharePoint list

I have a work from my time to use jQuery with SharePoint . I have written the code to get list items. When I run in IE it doesn't show any errors to me, but I am not getting the results. Can any one ...
1
vote
2answers
1k views

Getting Calendar items on Office 365 using REST API

I am having trouble with a REST call using jQuery on Office 365 and was wondering if you guys have ever experienced something similar and could give me some hints? What I am trying to achieve is to ...
1
vote
2answers
4k views

getEnumerator causing collection has not been initialized error inside of async call inside of a loop in a script editor web part

This is an issue I've been struggling with - What I am doing is using a script editor web part and when a user clicks the button, I check to see if a list exists inside of a loop (in this example, it ...
0
votes
1answer
857 views

A script on this page may be busy, or It may have stopped responding

there is one webpart on page that rotate the images so i added a jquery to rotate images and its working fine but after sometime it gives error like A script on this page may be busy, or It may have ...
9
votes
3answers
860 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
3answers
58 views

alert message not popping up

var j = jQuery.noConflict(); function PreSaveAction() { var txtTitle = j.(":input[title='Application Name']").val(); alert(txtTitle); if(txtTitle == ''){ alert("Value Cannot be ...
0
votes
1answer
31 views

Automatically update hyperlink to point to newest added document in a library

This is my first post here, so bear with me. I am reletivley new to SharePoint, however I do know my way around it. Basically on my site homepage I have promoted links set up along the top. One of ...
0
votes
2answers
46 views

Calculated column output with CSR

I have a calculated column which returns YES NO. I want to color code the entire row based on these values. Below is my code using CSR **(function () { // Initialize the variable that stores the ...
0
votes
2answers
38 views

Seattle.html and Oslo.html not visible in SharePoint Designer

The book I'm using as a resource to add jQuery to our SharePoint Online site discusses editing the Seattle.html and Oslo.html files in SharePoint designer. However, those files are not appearing in ...
0
votes
1answer
1k views

Hover effect over an image in SharePoint 2010

I would like to add a kind of hover effect over an image. My source code in JavaScript looks like the following: _spBodyOnLoadFunctionNames.push("color"); function color(){ var $th = $("div[Name='...
1
vote
1answer
56 views

jQuery in has stopped working in SharePoint Online Web Parts

So I'm adding a accordion to clean/beautify our team's SharePoint site. I had it functioning, then today I was modifying another part of the page and the accordion suddenly stopped working. I reverted ...
3
votes
2answers
5k views

How to get PublishingRollupImage for page in Page library with REST and jQuery?

I have a repeater in a user control and I databind it in code behind like so: var items = list.Items.Cast<SPListItem>() .OrderByDescending(a => a[...
1
vote
7answers
807 views

How to get People Picker ID using Javascript

Hi is there any way to get the People Picker value using Jquery / JavaScript? Currently we use title tag to get the id of our input fields values but people picker has only one generic title field ...
5
votes
3answers
263 views

Custom ECB-Menu Item which copies the Link of the document into the Clipboard

I would like to add an Item to the Edit Control Block Menu (ECB-Menu) (red marked in Screenshot), which copies when clicking on this Item (onClick) the link of the chosen document into the Clipboard. ...
0
votes
0answers
26 views

Javascript no longer works after loading a SSRS Viewer Web Part

I have a sharepoint 2013 page with three web parts. Two are list web parts and one is a SSRS Report viewer web part. I've added the following scripts to the page via a CEWP. <!-- Name: ...
1
vote
2answers
46 views

How to access custom property from User Profile using jquery

Environment : SP 2010 I have a custom property in User Profile called CompanyCode. I need to fetch this property using javascript/jquery in a master page. Can anyone let me know how to fetch custom ...
2
votes
3answers
782 views

Remember filter value using jquery and cookies

I am looking for a solution for the following problem: I have a large list that is related to a second list. The two list web parts are on one page, when you select an item in the first list, the ...