f
function getAgent(firstA){var i,j;
//清空 二级部门 下拉选单,仅留下默认的“请选择”
document.all.DropDownLists2.length = 1;
//异步请求firstA下的二级菜单
if(firstA != "-1")//当选 的不是“----请选择-------”
{
Ext.Ajax.request({
url:'GetSecondGrade?firstDepartmentID='+firstA,
method:'POST',
success:function(response,options){
if(response.responseText != "")
{
//填充二级部门 下拉列表
tmpArray = response.responseText.split(";");
for(j=0;j<tmpArray.length;j++)
{
secondArray = tmArray[j].split(":");
document.all.DropDownLists2.options[document.all.DropDownList2.length] = new Option(secondArray[1],secondArray[0]);
}
document.all.DropDownList2.length = document.all.DropDownList2.length-1;
}
},
failure:function(response,options)
{
Ext.MessageBox.alert('失败','请求超时或网络故障:'+response.status);
},
scope:this
});
}
}