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

learn more… | top users | synonyms

1
vote
2answers
789 views

how to validate SharePoint:formfield

I have a data view web part and it does insert,delete ,in edit mode it save and cancel button.The data is based on a custom list.In the list i have set the max to 4 but in DWP it doesn't seem to work. ...
0
votes
1answer
868 views

SharePoint 2007 HttpHandler can't use SPContext.Current.Site or SPContext.Current.Web when called from jQuery

I have the need to develop a custom HttpHandler in SharePoint. To start, I just coded up a simple example from here. On line 35 or 36 of that code I get a NullReferenceException thrown if I call my ...
1
vote
2answers
2k views

Security warning for JavaScript and CSS file?

I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. And I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net + JavaScript (jQuery). I met with the following ...
0
votes
2answers
153 views

How to merge mulitple list in single view?

We are using SP2013 On-Premise Standard Edition. So Content Search WebPart is not available. In a site collection there are 100+ subsites. Each subsite have a list with custom content type X. We need ...
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
36 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
45 views

Required field validator is not working in jQuery

Here is my code Index.cshtml I gave JavaScript functions but validations is not working please check this where i did mistake in this code. Product List <table ...
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 ...
0
votes
1answer
438 views

jquery is not working on panel hide on post back

I have created SharePoint application page and I have a Dropdownlist (ddlTaskFrequency). On dropdown text changed(Monthly) I have written a jQuery code to show panel2 and hide panel1. it is working ...
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
2answers
46 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 ...
1
vote
4answers
554 views

jQuery not working properly

In the editform.aspx of an item, I am trying to use jQuery to cause a pop up to go off anytime a field is changed (sort of silly, but once I get this to work, I plan on moving to doing more). However, ...
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
0answers
147 views

Access Sharepoint 2013 List from outside SP

Good morning, I wanted to be able to access items in a Sharepoint List from a stand-alone web page hosted on a different server. I've read through references to the REST API and I can see that I can ...
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: $()....
1
vote
2answers
645 views

Add run with run with elevated privileges for spservices?

I am unable to add users to the group using custom button and SPServices,only site administrators can only able to add the users to the group.can any one help me how to add the run with elevated ...
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?
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
1answer
350 views

SharePoint Online (Office 365) - AutoResolve people picker with current user and detect change in people picker value

I am trying to implement a solution in SharePoint Online by customizing the NewForm.aspx page of a out of the box Calendar List using JavaScript with the following requirements: When page loads, a ...
0
votes
1answer
5k views

How can I display checkbox or radio button choices in a Choice field vertically?

I have a list with SharePoint 2007 with a Choice column that I'd like the choices to be displayed vertically (every 2 or 3) instead of horizontally. Is there some JavaScript/jQuery I can utilize to ...
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
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\...
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 ...
0
votes
1answer
73 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....
0
votes
1answer
50 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
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
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 ...
2
votes
3answers
921 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
112 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
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('/')+' '+...
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
2answers
474 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
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
4answers
2k 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
75 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
64 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
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
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.
1
vote
1answer
36 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
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 ...