日期:2014-05-16 浏览次数:20692 次
<script type="text/javascript"> var form; Ext.onReady(function () { form = new Ext.form.FormPanel({ baseCls: 'x-plain', layout: 'absolute', //url: 'http://localhost:1683/Handler1.ashx', defaultType: 'textfield', items: [{ x: 0, y: 5, xtype: 'label', text: '收件人:' }, { x: 60, y: 0, name: 'to', anchor: '100%' // anchor width by percentage }, { x: 0, y: 35, xtype: 'label', text: '主题:' }, { x: 60, y: 30, name: 'subject', anchor: '100%' // anchor width by percentage }, { x: 0, y: 60, xtype: 'textarea', name: 'msg', anchor: '100% 100%' // anchor width and height }] }); var window = new Ext.Window({ title: '发送邮件', width: 500, height: 300, minWidth: 300, minHeight: 200, layout: 'fit', plain: true, bodyStyle: 'padding:5px;', buttonAlign: 'center', items: form, buttons: [{ text: '发送', handler: submit }, { text: '取消' }] }); window.show(); }); function submit() { if (!form.getForm().isValid()) return; form.getForm().submit({ waitMsg: '正在提交数据', waitTitle: '提示', //url: '../../Handler1.ashx', url: 'Home/GGG', method: 'GET', success: function (form, action) { Ext.Msg.alert('提示', '保存成功啊啊'); }, failure: function (form, action) { Ext.Msg.alert('提示', '原因如下:' + action.result.errors.info); } }); } </script>
public ActionResult GGG() { //Response.Write("{ success: false, errors:{info: '错误了'} }"); Response.Write("{success:true}"); Response.End(); return View(); }
那就是你访问的页面出现异常了,看看是哪里出现错误了。看看这个请求执行了那个页面的代码