I'm testing a basic insert new list item to custom list when user landed sub-sub site.
JS libraries are both reference in master page and path work perfectly. First I'm getting Synchronous XMLHttpRequest warning and the list is not updating.
Would appreciate any help. TIA.
function res_scr(val) {
$().SPServices({
operation: "UpdateListItems",
webURL: "http://portal/lists",
async: false,
batchCmd: "New",
listName: "MyPortalAwards",
valuepairs: [["Title", val]],
completefunc: function (xData, Status) {
if (status == "success") {
console.log("Data Saved! and Please check your List");
}
else {
console.log("Unable to submit your request at this time.");
}
}
});
}
$( document ).ready(function() {
if(window.location.href.indexOf("PoliciesCircularsMemo") >= 0) {
res_scr('RES-POLI-CIRC-MEMO');
}
});