首页 > 其他 > 详细

Ext通过后台校验字段是否重复

时间:2015-02-14 12:12:22      阅读:263      评论:0      收藏:0      [点我收藏+]

话不多说,直接上代码:

handlerRybh : function(textField) {
        Ext.Ajax.request({// ajax请求的方法
            url : ‘userManage/person/checkPersonByRybh.json‘,
            params : {
                "rybh" : textField.getValue(),
            },
            scope:this,//使回调函数中的this变成当前的类
            success : function(res) {
                var data = Ext.decode(res.responseText);
                if (data.success == ‘true‘) {
                    //do nothing
                } else if (data.success == ‘ApplicationException‘) {
                    Ext.getCmp(‘personWindow‘).down(‘#rybh‘).setActiveError(data.errorMsg);
                    Ext.getCmp(‘personWindow‘).down(‘#rybh‘).doComponentLayout();//显示提示信息
                } else {
                    Ext.Msg.alert(‘系统错误提示‘, data.errorMsg);
                }
            },
            failure : function(res) {
                var respText = Ext.decode(res.responseText);
                Ext.Msg.alert(‘系统提示‘, respText.error);
            },
        });
    },

Ext通过后台校验字段是否重复

原文:http://www.cnblogs.com/sdjnzqr/p/4291378.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!