var CRUD = { add: function () { var hDialog = top.jQuery.hDialog({ title: '添加', width: 800, height: 600, href: formurl, iconCls: 'icon-add', //初始化添加 onLoad: function () { //数据字典中获取值 top.$('#txt_fenlei').combobox({ url: '/sys/ashx/dichandler.ashx?categoryId=105', valueField: 'Title', textField: 'Title', editable: false, required: true, missingMessage: '', disabled: false }); top.$('.kindeditor').kindeditor();//初始化kingdeditor编辑器 }, submit: function () { //alert(top.$("#uiform").form('enableValidation').form('validate')); //alert(top.$("#uiform").form('validate')); //原来用的是这种方法 alert(top.$('#uiform').validate().form()); if (top.$("#uiform").form('validate')) { var query = createParam('add', '0'); jQuery.ajaxjson(actionURL, query, function (d) { if (parseInt(d) > 0) { msg.ok('添加成功!'); hDialog.dialog('close'); grid.reload(top.$('#txt_fenlei').combobox('getValue')); } else { MessageOrRedirect(d); } }); } msg.warning('请填写必填项!'); return false; } });
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4