Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
3k 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
19 views

Backup Aspx Site Page to Network Drive

Did a lot of research and tests but can't find a working solution. I have a few aspx site pages and I want to back them up onto network drive or my c drive because I don't want to lose them. but I ...
0
votes
2answers
1k views

How to hide sub-tasks on a list view

I currently have a large project list that has numerous sub-tasks assigned to each main section. I'm looking to create a view that only displays the top level tasks. I've looked at a previous ...
0
votes
3answers
2k views

How to store the hit count of a page in a sharepoint list.

I have created a page and now I want to get the track of hit count of that page. I want to store that no. in a sharepoint list. On every page load the count should get increased by 1 and get stored ...
0
votes
1answer
1k 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
2answers
4k views

Populate a choice field when another choice field changes

I have two choice fields. When choice field A is equal to Commercial then choice field B should change to Staged. I've found this hide function and was trying to change it to fit my needs but I'm ...
3
votes
3answers
3k 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 ...
0
votes
1answer
25 views

I am retrieving items from a list and want only 4 to show on my page

I am retrieving items from a list, which has 5 items, but I only want 4 to show and every time I add a new item I want the new item to show first and then the other 3 items to follow and the fifth ...
1
vote
2answers
828 views

Why is PreSaveAction or PreSaveItem not working in my latest SharePoint Online version?

I have created a new webpart page, in this page inserted content editor and my list web part e.g. employee list with latest SharePoint Online version. Then, in the content editor I have entered below ...
1
vote
2answers
2k views

Bind the DateTimeField field with Today's date using SPServices and jQuery

How to bind the DateTimeField field with today's date using SPServices and jQuery? I can't use the default Today to set the column in the Sharepoint UI to use Today's Date as the default value in my ...
6
votes
1answer
2k 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 ...
0
votes
1answer
894 views

Updating sharepoint list items with batch pnp, in bad request

I've used this guide to create my batch and update the items. var list = pnp.sp.web.lists.getByTitle("Categories"); list.getListItemEntityTypeFullName().then(entityTypeFullName => { var batch =...
3
votes
1answer
1k 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 ...
6
votes
2answers
3k 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 ...
2
votes
2answers
7k 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 ...
5
votes
2answers
4k 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({ ...
0
votes
1answer
646 views

Site Assets Javascript file will not update

So I have the weirdest problem I have seen in SharePoint yet. So I am trying to practice using javascript and I can't figure out what is wrong with my methodology. For a background, I am trying to ...
0
votes
1answer
27 views

I have an old webpart in XML and using SP services. I need to convert using Ajax

I was given an old webpart using SP services and XML. I was requested to use Ajax. This is the first time I do this kind of conversion and I am not sure if I am doing it correctly. This is the old ...
0
votes
4answers
2k views

Disable column header filter and sorting

I am using SP2013 on-premise. On a list view all the columns' header come with a filter+sorter function. It is not useful on some columns (e.g. photo, which show a picture and no point to sort, and ...
0
votes
1answer
29 views

Jquery and SharePoint Currency Field

I have a form with multiple SharePoint fields set as "currency". How do I put a currency field value into a variable? I've tried several version, such as: var txt01TotCash = $("input[id='...
0
votes
2answers
800 views

Listdata.svc and $expand

Normally I would use jQuery to get data from listdata.svc like this: $.getJSON(listUrl, function (data) { $.each(data.d.results, function (i, result) { A ...
1
vote
1answer
5k views

Set the column width in GANTT view

When the GANTT view is being used, how could one resize the columns using jQuery without using the generated controlid (like in this example)? I'm looking for a way to do this in a re-usable ...
0
votes
0answers
18 views

How to display multiple calendar icon calendar events using jquery

I would like to view a sharepoint calendar using this view here Happy to do it using rest or CSOM but looking for a jquery plugin. Anyone done something similar or where can i find such a plugin. ...
1
vote
2answers
736 views

SharePoint 2013 Jquery Show/Hide Fields based on DatePicker value

In a SharePoint edit form, I know that you can show/hide fields based on a drop down field value (SPUtility Show Hide Field Based on Value from another field Custom Form) but I wanted to show/hide ...
1
vote
0answers
37 views

SharePoint show hide after presave [closed]

I have a requirement to show three text boxes and make them mandatory on check of radio button else hide the text boxes. I am able to show hide in New and Edit form. But on Disp read form I am not ...
0
votes
0answers
20 views

Sharepoint 2013, JS link people picker field not working saving for multiple users

I am using below CSR code to set peoplepicker value to multiple person. I have multiple users to be assigned to my peoplepicker field. The code works when i pass current user, but it do not work for ...
0
votes
0answers
12 views

Query site collection for specific content type and display as a list

I'm working on a main page for a projects site collection in SharePoint 2013 on-premises. Each subsite is a project based on the same template. Using a CQWP with a custom display template, I've ...
0
votes
1answer
16 views

Steps in updating single field for multiple (selected) lists items

I am very new in SharePoint and wanted to seek some help. I have created a simple SP list that has a simple approval process. It is working fine. However, I was task to enhance it by allowing the ...
0
votes
1answer
26 views

Promoted Links list to show most clicked document library tiles

I am working with SharePoint online and on a subsite landing page, I am using promoted links list web part to render 8 tiles, one for each document library, when users click on these tiles, they get ...
5
votes
2answers
623 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" /> ...
1
vote
0answers
10 views

Update the index of the related object after spice in an object using JavaScript [closed]

There are 2 variables: var brands = [ {Brand: "Hyundai"}, {Brand: "Toyota"}, {Brand: "Honda"}, {Brand: "Volkswagen"} ] var cars =[ {Car: "Elantra", BrandIndex = 0}, {Car: "...
0
votes
0answers
21 views

Audience Targeting

A short Breakup what I wanna do in Spfx. My goal is it to provide a custom-designed Sharepoint site based on the Users group. The first step would be to hide all Webparts on the Side and then to ...
1
vote
4answers
166 views

jquery appended option not posting in default new form

we have a list for travel schedules. We have a dropdown for Monday to Friday then individual mulitselects for each day. i am trying to use the following code to auto populate the selected item for ...
0
votes
1answer
50 views

Add jquery reference to JSlink file

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file. I tried adding those files in in ...
0
votes
1answer
44 views

expandable list of columns ( sharepoint 2013)

I have a list with too many columns (over 20 columns) and I would like to make some of these columns expandable to make the navigation easy for users. is it possible, knowing that I don't have ...
1
vote
1answer
689 views

Upload javascript file to sharepoint online library saved in wrong format

I am trying to Upload a myfile.min.js to sharepoint online using JavaScript using JSOM but its stored as wrong encosing format var req = jQuery.ajax({ url: sourceFileItem + '?ver=' + (...
0
votes
0answers
22 views

How to ensure field is unique using JavaScript

I have two lists: List A - a workflow tasks list List B - an employees list containing fields such as employee name (person column), employee number (single line of text), etc. I have a workflow ...
3
votes
3answers
6k views

Auto fill People Picker Column with current user in 2013 in new and Edit Form

I want to auto fill the new People picker column in SharePoint 2013. I want to do it in Edit and New form. It could be current user or anyother user.
0
votes
1answer
68 views

Sharepoint Framework doesn't run jquery in .js file

I'm starting out with Sharepoint framework and at this point I just want to play around and get familiar with the concepts. I've created webparts with the Yeoman generator and launched them in the ...
0
votes
1answer
37 views

How to open up View Item from task list in SPO in a new tab

I am working with SPOnline Task list. Users click on View Item for a given task to go to the display form which by default opens in same window. Is there a way to open it up in a separate tab? ...
0
votes
2answers
86 views

How to chain promises for multiple ajax calls to SharePoint to get user ids?

Broken promises, thought I had it figured out, still trying to get reliable results. Console log shows hit and miss results. Below is the rundown of what I'm trying to achieve. Is there a simpler way ...
0
votes
0answers
35 views

validation append comment history

In list I have a column name Comments multiline text box (append type) which is appending user comments , I want to validate that user must upload file in comment box before saving else it will not ...
0
votes
1answer
75 views

Replace HTML list values with substring on SharePoint 2013 Custom List Field

I'm using SPAutocomplete from SPServices because I have a requirement to make a searchable lookup field rather than an OOTB lookup field (drop down menu), as there is potential for thousands of values ...
0
votes
1answer
62 views

Mask for textbox in sharepoint 2013

I'm trying to put mask in my sharepoint list, unfortunately answers from similliar questions are too old, so jqueries doesn't work at all (or they are false added by me) I don't have Sharepoint ...
2
votes
2answers
822 views

jquery.done runs before when - deferred promise

I have placed a SEWP in an editform and the code is supposed to do the following: check if the logged in user is site administrator and web administrator - if not then hide a specific field. These two ...
2
votes
2answers
743 views

JQuery add class to url when on page in current navigation menu

I'm currently using the SharePoint Web Control spnavigationmanager to create a navigation for sites that are easily configurable by going to Site Settings > Navigation and making changes there. I'm ...
0
votes
0answers
15 views

Can I leverage the OOB Assigned To Email Notification functionality to send an email to the Created By user?

I have an Issues List with customization in SharePoint that I've chose to enable email notifications to the Assigned To person after the issue is assigned. I'd like to also send an email notification ...
1
vote
1answer
1k views

ModalDialog // change title when dialog openned

I open popup modal dialog with something like this: openInDialog: function (dlgWidth, dlgHeight, dlgAllowMaximize, dlgShowClose, needCallbackFunction, pageUrl) { var options = { autoSize: ...
1
vote
2answers
427 views

Get the data from Multi line Text field and set it to text area line by line

I have a multi line rich text field and I want to get the data from column and set in text area line by line. I tried Splitting but I need another solution if possible.
0
votes
0answers
150 views

SharePoint REST API get values of checkboxes, Get/Post

Using SharePoint REST API, have a Bootstrap/HTML form that has about 20 questions, each with it's own group of checkboxes, and I'm trying to both Get and Post the values from the "checked" boxes. I ...