An object error. Script jquery-ui.js, jquery-1.11.0.js and jquery.spservices-2014.01.js are inserted via v4.master on a sharepoint site. Just attempting to get a suggestion list from a source list but receiving an unknown method recognition. The method is "autocomplete".
Code is below.
<script type="text/javascript">
window.onload = function() {
window.setTimeout(readyCall, 1000);
}
function readyCall(){
var itemSource= [];
$().SPServices({
operation: "GetListItems",
listName: "Affiliations",
CAMLViewFields: '<ViewFields><FieldRef/></ViewFields>',
CAMLQuery: '<Query><OrderBy><FieldRef Name=\'Title\' Ascending=\'True\' /></OrderBy></Query>',
async: false,
completefunc: function (xData, Status) {
$(xData.responseXML).find("[nodeName= 'z:row']").each(function() {
itemSource[k] = $(this).attr('ows_Title');
k = k + 1;
});
}
});
$(input[id$='ctl00_m_g_82ef3c54_19cd_46ba_95df_efb2a8c359e7_FormControl0_V1_I1_T19']).autocomplete({
source: itemSource,
minLength: 3
});
}</script>
Comments: Please close this and open up a Discussion. Issues are for items that need fixing or enhancements. You will get help quicker from Discussions.
Code is below.
<script type="text/javascript">
window.onload = function() {
window.setTimeout(readyCall, 1000);
}
function readyCall(){
var itemSource= [];
$().SPServices({
operation: "GetListItems",
listName: "Affiliations",
CAMLViewFields: '<ViewFields><FieldRef/></ViewFields>',
CAMLQuery: '<Query><OrderBy><FieldRef Name=\'Title\' Ascending=\'True\' /></OrderBy></Query>',
async: false,
completefunc: function (xData, Status) {
$(xData.responseXML).find("[nodeName= 'z:row']").each(function() {
itemSource[k] = $(this).attr('ows_Title');
k = k + 1;
});
}
});
$(input[id$='ctl00_m_g_82ef3c54_19cd_46ba_95df_efb2a8c359e7_FormControl0_V1_I1_T19']).autocomplete({
source: itemSource,
minLength: 3
});
}</script>
Comments: Please close this and open up a Discussion. Issues are for items that need fixing or enhancements. You will get help quicker from Discussions.