function getUser(){ajax
var loginName = $("#loginName").val();ide
//alert(loginName);url
$.ajax({spa
type: "POST",code
url: "userManage!getUser.c?",get
data: "inputName="+loginName,input
success: function(msg){it
$('#loginName').combobox({ io
url:'userManage!getUser.c?inputName='+logingName, function
valueField:'name',
textField:'displayName'
});
},
error:function(){
alert("error");
}
});
};
$(function (){
var userId = $("#id").val();
var userValue;
if(userId!="") {
//alert(userId);
$('#loginName').attr("readonly", "readonly");
}
$('#loginName').combobox({
valueField:'name',
textField:'name',
onSelect:function(record){
$('#save1').linkbutton('enable');
$('#save2').linkbutton('enable');
$("#code").val(record.name);
},
onChange:function(newValue,oldValue){
if(oldValue && newValue){
$('#loginName').combobox("reload",encodeURI(encodeURI("userManage!getUser.c?inputName="+newValue)));
}
$('#save1').linkbutton('disable');
$('#save2').linkbutton('disable');
var userId = $("#id").val();
if(userId!="") {
//$('#loginName').combobox("readonly", "true");
$('#loginName').combo("disable",true);
$('#loginName').val(userValue);
$('#loginName').attr("readonly", "readonly");
$('#save1').linkbutton('enable');
$('#save2').linkbutton('enable');
}
}
});
});