`
Aguo
  • 浏览: 32646 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

答复: Ext2.0 Form表单提交然后跳转到其它页面问题。

EXT 
阅读更多
供参考
    var simple = new Ext.form.FormPanel({
        labelWidth: 55, // label settings here cascade unless overridden
        frame:true,
        bodyStyle:'padding:5px 5px 0',
        width: 230,
        defaults: {width: 120},
        defaultType: 'textfield',
        renderTo: 'div_search',

        items: [{
                fieldLabel: searchLabel,
                name: 'keyword',
                id:'keyword',
                allowBlank:true
            },new SearchComboBox({
                hiddenName: 'scope',
                url: './builder.do?button(loadFields)&field(entity)='+config.entity,
                emptyText:scopeLabel,
                label:scopeLabel
            })
        ],

        buttons: [{
            text: searchButtonText,type:'submit',
            handler: function(e){
                simple.submit();
            }
        }],

        onSubmit: Ext.emptyFn,
        submit: function() {
            var form = simple.getForm().getEl().dom;
            form.action = "./"+config.name+".do?button(popup)";
            form.target='master_list';
            form.submit();
        }
    });
分享到:
评论
2 楼 amendar 2008-08-27  
代码很实用,谢谢这位仁兄~~
1 楼 sbdwtg00 2008-08-14  
非常感谢您提供的代码,已成功跳转到相应的页面,有些参数,希望您给解释一下:
# var simple = new Ext.form.FormPanel({  
#     labelWidth: 55, // label settings here cascade unless overridden  
#     frame:true,  
#     bodyStyle:'padding:5px 5px 0',  
#     width: 230,  
#     defaults: {width: 120},  
#     defaultType: 'textfield',  
#     renderTo: 'div_search',  
#   
#     items: [{  
#             fieldLabel: searchLabel,  
#             name: 'keyword',  
#             id:'keyword',  
#             allowBlank:true  
#         },new SearchComboBox({  
#             hiddenName: 'scope',  
#             url: './builder.do?button(loadFields)&field(entity)='+config.entity,//这个链接做什么用?  
#             emptyText:scopeLabel,  
#             label:scopeLabel  
#         })  
#     ],  
#   
#     buttons: [{  
#         text: searchButtonText,
#         type:'submit',//为什么要指定这个呢?  
#         handler: function(e){  
#             simple.submit();  
#         }  
#     }],  
#   
#     onSubmit: Ext.emptyFn,//emptyFn指的是什么呢?  
#     submit: function() {  
#         var form = simple.getForm().getEl().dom;  
#         form.action = "./"+config.name+".do?button(popup)";  
#         form.target='master_list';  
#         form.submit();  
#     }  
# }); 

相关推荐

Global site tag (gtag.js) - Google Analytics