Hi,
When a user enters in a input text box, I have a list that comes from DB, which I can see on the browser when I debug, but that list is not being displayed as autocomplete suggestions. I’m sure I’m missing something. Please guide me…
In header,
[code]
[/code][code]var layoutObj6 = document.getElementById(“layoutObj6”);
myLayout6.cells(“a”).setText(" Impersonation:");
myImpersonationFormData = [
{type: “block”, list:[
{type: “input”, name: “txtImpersonate”, id: “txtImpersonate”, offsetLeft: 0, inputWidth: 125},
{type: “newcolumn”},
{type: “button”, value: “Set”, name: “btn_impersonate”, id: “btn_impersonate”, width: 20}
]}
];
myImpersonationForm = myLayout6.cells("a").attachForm(myImpersonationFormData);
myLayout.cells("a").appendObject(layoutObj6);
myImpersonationForm.attachEvent("onInputChange", function (name, value,myImpersonationForm){
if(name == 'txtImpersonate'){
$.ajax({
url : env + "/MyProject/GetUserList",
type : "GET",
data : { user : value, contextAppName : "myimpersonate"},
dataType : "jsonp",
success : function(data) {
response(data.userList);
},
error: function(jqXHR, textStatus, errorThrown){
alert("ERROR!!! \n \n System Error code: " + jqXHR.status + "\n \n Please contact Server administrator.);
}
});
}
});[/code]