I have an autocomplete script that works ok in the sense that it shows the options to select from after the user types 2 letters. Now, the problem I have is that after the selection is made and the text field is filled out, the script stops. For example, if I make a selection from the given entries, and for some reason I have clear the text field, once I start typing again, the autocomplete doesn't show anything at all.
The form performs a postback everytime I select values from a couple of dropdown controls, and I noticed the script stops once the postbacks are triggered. Is there any way I can have the scripts running after each postback?
If anybody can point the right directions, I would really appreciate it.
notice that i used a List Form so i cannot use code.
Thanks.
<script language="javascript" src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script language="javascript" src="/Scripts/jquery.SPServices-0.7.1a.min.js" type="text/javascript"></script>
<script language="javascript" src="/Scripts/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>
<link href="/Scripts/jquery-ui-1.8.22.custom.css" rel="stylesheet" type="text/css"/>
<script language="javascript" type="text/javascript">
//Wait ##### seconds for form to load before calling the function.
window.onload = function(){
window.setTimeout(readyCall, 1000);
}
function readyCall(){
//Variable for Array where Title column values will be pushed to.
var Requestors = [];
//Variable for the Requestor Text Field.
var RequestorField = "input[id$='FormControl0_V1_I1_T2']"
//Call the SPServices library.
$().SPServices({
operation: "GetListItems",
listName: "Requestor",
CAMLViewFields: "",
async: false,
completefunc: function (xData, Status){
$(xData.responseXML).SPFilterNode("z:row").each(function(){
Requestors.push($(this).attr("ows_Title"));
});
}
});
//Input field from form.