2
votes
Create new array from data.d.results
You should try to avoid using ajax sync calls.
Try to do whatever you want in the success callback if is posible.
function forLoop(){
var siteUrl = "http://site/_api/web/lists/GetByTitle('...
2
votes
Create new array from data.d.results
You describe a console.log() statement as printing the names in "an increment style", first printing one name, then printing two names, then printing three names, etc.
If the console.log() line that ...
1
vote
Accepted
Relative URL or using _spPageContextInfo
Try this
<script src="../../jslib/jquery351/jquery351.min.js"></script>
1
vote
Accepted
Create new array from data.d.results
Please find below a better solution of what you are trying to achieve.
function forLoop(){
var siteUrl = "http://site/_api/web/lists/GetByTitle('SPRestTest')/items";
$.ajax({
url: ...
1
vote
Accepted
JavaScript for SharePoint Traffic Light Color
Modify the renderTrafficLight method as below.
function renderTrafficLight(ctx) {
var curritem = ctx.CurrentItem;
var dueDateValue = ctx.CurrentItem['DueDate'];
var trafficLightValue = ...
1
vote
Accepted
Check if People picker has any value on document.ready of EditForm.aspx in jsom sharepoint 2013
The following code for your reference.
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(...
1
vote
Check if People picker has any value on document.ready of EditForm.aspx in jsom sharepoint 2013
Use something like below code to get the value in person or group field:
$(document).ready(function() {
SP.SOD.executeFunc("/_layouts/15/clientpeoplepicker.js","SP.ClientContext",function(){
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
custom-javascript × 21javascript × 14
sharepoint-server × 8
sharepoint-online × 4
sharepoint-enterprise × 4
sharepoint-addin × 3
sharepoint-rest-api × 3
2013 × 1
sharepoint-designer × 1
workflow × 1
sharepoint-foundation × 1
office-365 × 1
jquery × 1
2016 × 1
jsom × 1
spservices × 1
date-time × 1
custom × 1
sharepoint-search × 1
attachments × 1
person-or-group × 1
nodejs × 1
presaveaction × 1
relative-path × 1