<link href="http://code.jquery.com/ui/1.8.24/themes/base/jquery-ui.css" rel="stylesheet"/>
<script type="text/javascript">
window.onload = function() {
window.setTimeout(readyCall, 1000);
}
function readyCall(){
var externalParties= [];
$().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).SPFilterNode("z:row").each(function() {
externalParties.push($(this).attr("ows_Title"));
});
}
});
$("input[id$='ctl00_m_g_82ef3c54_19cd_46ba_95df_efb2a8c359e7_FormControl0_V1_I1_T12']").autocomplete({
source: externalParties,
minLength: 3
});
}</script>
Comments: Would it be possible to explain and format the source code so that it would be a chance to recommend something?
<script type="text/javascript">
window.onload = function() {
window.setTimeout(readyCall, 1000);
}
function readyCall(){
var externalParties= [];
$().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).SPFilterNode("z:row").each(function() {
externalParties.push($(this).attr("ows_Title"));
});
}
});
$("input[id$='ctl00_m_g_82ef3c54_19cd_46ba_95df_efb2a8c359e7_FormControl0_V1_I1_T12']").autocomplete({
source: externalParties,
minLength: 3
});
}</script>
Comments: Would it be possible to explain and format the source code so that it would be a chance to recommend something?