下面是完整的页面文件<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Grid3 Example</title>
    <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="ext/ext-all.js"></script>
    <script type="text/javascript" src="common.js"></script>
    <style type="text/css">
        .add {
            background-image:url(images/icons/fam/add.gif) !important;
        }
        .option {
            background-image:url(images/icons/fam/plugin.gif) !important;
        }
        .remove {
            background-image:url(images/icons/fam/delete.gif) !important;
        }
    </style>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
    Ext.QuickTips.init();
    Ext.form.Field.prototype.msgTarget = 'side';
    var top = new Ext.FormPanel({
labelWidth: 70,
        frame:true,
        title: '系统设置',
        bodyStyle: 'padding:5px 5px 0',
style: 'margin: 10px',
width: 700,
defaults: {width: 230},
defaultType: 'textfield',
        items: [{
                fieldLabel: '标 题',
                name: 'title'
            },{
fieldLabel: '短标题',
name: 'shorttitle'
},{
xtype:'combo',
store: new Ext.data.SimpleStore({
fields: ["retrunValue", "displayText"],
data: [[0,'无']]
}),
valueField :"retrunValue",
displayField: "displayText",
mode: 'local',
editable: false,
forceSelection: true,
triggerAction: 'all',
hiddenName:'category',
fieldLabel: '分 类',
emptyText:'选择分类',
name: 'category'
            },{
fieldLabel: '作 者',
name: 'author'
},{
fieldLabel: '来 源',
name: 'source'
},{
xtype:'textarea',
                fieldLabel: '摘 要',
                id:'brief',
                name: 'brief'
            },{
xtype: 'htmleditor',
fieldLabel: '内 容',
width: 500,
name: 'content',
fontFamilies: ['宋体','黑体']
},{
xtype:'combo',
store: new Ext.data.SimpleStore({
fields: ["retrunValue", "displayText"],
data: [[1,'显示'],[0,'隐藏']]
}),
valueField :"retrunValue",
displayField: "displayText",
mode: 'local',
editable: false,
forceSelection: true,
triggerAction: 'all',
hiddenName:'status',
fieldLabel: '状 态',
emptyText:'选 择',
name: 'status',
value: 0
},{
xtype:'hidden',
name: 'id',
id:'id',
value: ''
}],        buttons: [{
            text: '确定',
handler:function(){
if(top.form.isValid()){
top.form.doAction('submit',{
 url:'index2.php?model=news&action=save',
 method:'post',
 params:'',
 success:function(form,action){
  Ext.Msg.alert('操作','保存成功!');
 },
 failure:function(){
Ext.Msg.alert('操作','服务器出现错误请稍后再试!');
 }
                      });
}
}
        },{
            text: '重置',
handler:function(){
Ext.Msg.alert('操作','服务器出现错误请稍后再试!');
top.form.reset();
}
        }]
    });
    top.render(document.body);
});
</script>
</body>
</html>

解决方案 »

  1.   

    index2.php?model=news&action=save这个页面在你项目里是否存在
      

  2.   

    或者用Ext.Ajax.request这种方式提交一次看看
      

  3.   

    index2.php?model=news&action=save //后台的处理有错误我已经对你的代码调试了下,是正确的,很有可能是在服务器端处理错误 而没有正确返回数据导致我在代码里面只替换了url:'register.aspx?model=news&action=save',这个参数然后在'register.aspx.cs里面我只写了一条语句:Response.Write("{success:true}");测试的结果是成功的.所以 建议你查查你的服务器端代码吧欢迎访问Ext博客