0
안녕하세요. 내 응용 프로그램에 dhtmlx 양식을 사용하고 있습니다. 사용자가 텍스트 상자에 텍스트를 입력하면 콘솔에서 볼 수있는 데이터베이스에서 제안 자동 완성 기능을 원합니다. 그러나이 입력 상자 아래에 추천 목록을 표시하지 않습니다. 내가 ---- 스크립트 부분에서 ajax를 사용하여 dhtmlxform의 입력 텍스트 상자에서 자동 완성 제안이 작동하지 않습니다.
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="dhtmlx/dhtmlxSuitePRO/codebase/dhtmlx.css" />
<link rel="stylesheet" href="dhtmlx/dhtmlxScheduler/codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="dhtmlx/dhtmlxSuitePRO/codebase/dhtmlx.js"></script>
<script src="dhtmlx/dhtmlxScheduler/codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<script src='dhtmlx/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_tooltip.js' type="text/javascript" charset="utf-8"></script>
<script src="dhtmlx/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_all_timed.js" type="text/javascript" charset="utf-8"></script>
<script src="dhtmlx/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_minical.js" type="text/javascript" charset="utf-8"></script>
<script src="dhtmlx/dhtmlxScheduler/codebase/ext/dhtmlxscheduler_serialize.js" type="text/javascript" charset="utf-8"></script>
파트 - 헤더에서 음을
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 : "/MyProject/GetUserList",
type : "GET",
data : { user : value},
dataType : "jsonp",
success : function(data) {
response(data.userList);// can see the list in browser console
},
error: function(jqXHR, textStatus, errorThrown){
alert("ERROR!!! \n \n System Error code: " + jqXHR.status + "\n \n Please contact Server administrator.);
}
});
}
});