Skip to main content

Questions tagged [js]

0 votes
1 answer
99 views

Disable drag & drop events in calendar views SharePoint Online

I want to prevent drag & drop item from calendar view, because I don't want to give editing permission to user directly from calendar view. Any idea to prevent this?
Damian's user avatar
  • 11
1 vote
1 answer
157 views

How do I make the items in "Title" column clickable?

I'm trying to make all the titles in the column "Title" (the default title) clickable to direct me to a specific site page in SharePoint2013 as shown: <ViewFields> <FieldRef ...
Bloom 's user avatar
  • 23
0 votes
1 answer
69 views

multiple $http calls in angular sp app

I am trying to chain together some http calls using angular to access the 'current' ProjectUID. I need to use this in a variable. I've looked at quite a few articles, and recognized the issue I was ...
user2004758's user avatar
0 votes
0 answers
65 views

Stoplights showing script instead of colors

Here is the original post about the Stoplights for SP 2016 on prem. Stoplight Indicators Pulling From Multiple Columns This is the script I have on the page that rendered the Stoplight <script src=&...
user79745's user avatar
4 votes
1 answer
5k views

target="_blank" not working in a tag SharePoint online [closed]

The target="_blank" not working for a tag when used in SharePoint online.
Patrick Jane's user avatar
1 vote
1 answer
442 views

How to Set Yes/No field on selected list items (if/else) using JavaScript in SharePoint 2013

In SharePoint 2013, "Discussion" list, I have created a button "fix/unfix" (Yes/No type field) discussion. But the script only works the second time and subsequent times. This script checks the value ...
Hellsings's user avatar
0 votes
1 answer
4k views

Import js in tsx files

I want to include a JS file into my TSX file. I created this project using yo @microsoft/sharepoint The js file import * as React from "react"; export default class AutocompleteText extends React....
Random I.T's user avatar
1 vote
1 answer
115 views

Rest API to get different data

I have the following code to get values of a column. function GetKPIS(EstruturaKPI){ jQuery.ajax({ url: "SITE/_api/web/lists/GetByTitle('KPI')/items?$filter=Title eq '" + EstruturaKPI + "'", ...
João's user avatar
  • 45
0 votes
1 answer
2k views

'SP is not defined' when trying to run JS code on Modern Script Editor

I am facing this error message, referring to this line: SP.SOD.executeFunc('sp.js', CheckCurrentUerGroup); I am quite new to this stuff but what is causing this? I want to use a basic redirecting ...
Y_Lakdime's user avatar
  • 113
0 votes
2 answers
729 views

JavsScript/CSS Files in SharePoint Style Library/Site Assets not updating

We store all code files(.js/.css) in Style Library/Site Assets Library in SharePoint Publishing site. Sometimes, we/end users don’t see the updated JavaScript/CSS files in Browser even after clearing ...
Puli Bala's user avatar
2 votes
1 answer
213 views

Order By Ascending with CamlBuilder()

How to write a function to order by ascending: true for date field. There is a picture library in our site. I find .OrderByDesc('year'), but I need it's opposite: var query = new CamlBuilder() ...
Fernando Santana's user avatar
1 vote
2 answers
339 views

O365, I have a Column Named 'Status' to show Green/Red circle but I am struggling

This is from a List and on List setting there are two Columns that involves the problem I am facing. Status (absolute name = ColorStatus) NewCol2 Users will enter in either 0 or 1 in NewCol2 field ...
Masarubae's user avatar
0 votes
1 answer
65 views

Syntax Error with ExecuteOrDelayUntilScriptLoaded(myF, "sp.js");

I've a script referenced in List's view like : <JSLink>~/retrieveAlarm.js</JSLink> The first lines of the script show up an syntax error: $(document).ready(function() { ...
Francois Borgies's user avatar
0 votes
2 answers
60 views

Need help with JS syntax

I want to show/hide a div based on the value of a SP dropdown/choice column on form. I have written below code to this which is not written correctly. Can anyone help me with syntax to correct this? ...
ideaguy1974's user avatar
0 votes
1 answer
2k views

How i can check if my Date Time field is less than Today() date inside JS script

I have the following JS script to color code our custom list items inside out list view, by checking if the item is status does not equal Delivered and its EndDate has been bypassed:- SP.SOD....
John John's user avatar

15 30 50 per page