您的位置:首页 > Web前端 > JavaScript

extjs textField之后添加一个button以及后台数据交互

2013-09-04 17:12 555 查看
var pnRow1=new Ext.Panel({
border:false,
layout:'column',
items:[
new Ext.Panel({
columnWidth:.2,
layout:'form',
border:false,
labelWidth:100,
labelAlign:'left',
items:[
{
xtype : "textfield",
id:"contract_id",
name:"contract_id",
maxLength :20,
value:'${model.contract_id}',
fieldLabel : "合同标识",
width : 150
}
]
}),
//
new Ext.Panel({
columnWidth:.1,
layout:'form',
border:false,
labelWidth:100,
labelAlign:'right',
items:[{
text: '获取',
id:'selectDuty2',
xtype: 'button',
handler : function() {

Ext.Ajax.request({
url: 'contractAction!getContract_id.shtml',
method: 'POST',
params: {},
success: function (result, request){
Ext.getCmp('contract_id').setValue(result.responseText);
//alert( result.responseText+"-----"+request["id"]);
},
failure: function (result, request){
}
});
}}
]
}),
//
new Ext.Panel({
columnWidth:.3,
layout:'form',
border:false,
labelWidth:100,
labelAlign:'right',
items:[
comboInspaction_authority2
]
}),
//
new Ext.Panel({
columnWidth:.3,
layout:'form',
border:false,
labelWidth:100,
labelAlign:'right',
items:[
comboInspection_type2
]
})

]
});

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐