var merchantNumText=new Ext.form.TextField({
fieldLabel : '商户编码',
invalidText:'该已被占用',
name: 'merchantnum',
hiddenName : 'merchantnum',
maxLength : 50,
allowBlank:false,
//validateOnBlur:true,
validator:function(thisText){
Ext.Ajax.request({
url : 'merchant.do?method=check',
success : function(response) {
var res = Ext.util.JSON.decode(response.responseText);
alert(res.valid);
return res.valid; //{valid:'true'}or{valid:'false'}
},
failure : function() {return false;},
params:{vtext:thisText}
});
}
}); 上面代码验证总是通过不了,我查了一下,说是异步的问题。
谁用过ext3.0的远程验证,教教我,没用过的不用发表意见了。
fieldLabel : '商户编码',
invalidText:'该已被占用',
name: 'merchantnum',
hiddenName : 'merchantnum',
maxLength : 50,
allowBlank:false,
//validateOnBlur:true,
validator:function(thisText){
Ext.Ajax.request({
url : 'merchant.do?method=check',
success : function(response) {
var res = Ext.util.JSON.decode(response.responseText);
alert(res.valid);
return res.valid; //{valid:'true'}or{valid:'false'}
},
failure : function() {return false;},
params:{vtext:thisText}
});
}
}); 上面代码验证总是通过不了,我查了一下,说是异步的问题。
谁用过ext3.0的远程验证,教教我,没用过的不用发表意见了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货