extjs:使用FormPanel提交功能时打开一个新窗口
呵呵,, 我正在创建一个Formpanel:extjs:使用FormPanel提交功能时打开一个新窗口,extjs,window,submit,new-operator,formpanel,Extjs,Window,Submit,New Operator,Formpanel,呵呵,, 我正在创建一个Formpanel: inputForm = new Ext.FormPanel({ id:'inputForm', frame: true, closable:true, collapsible:true, renderTo:'somewhere', layout:'anchor', standardSubmit:true, method: 'post', items:[{ ... }] )};
inputForm = new Ext.FormPanel({
id:'inputForm',
frame: true,
closable:true,
collapsible:true,
renderTo:'somewhere',
layout:'anchor',
standardSubmit:true,
method: 'post',
items:[{ ... }]
)};
并使用此提交按钮:
text:'run',
id: 'runButton',
handler:function(){
Ext.getCmp('inputForm').getForm().submit();
}
如何在新窗口/选项卡中打开提交页面???您是否解决了问题,。。因为我知道你的问题是两天前的 我是这样定义表单的:
var inputForm = new Ext.FormPanel({
id:'inputForm',
method : "POST",
url : "blablabla.php",
items : [{...}]
//standardSubmit : true // i do not need standardSubmit
});
还有我的按钮
text:'run',
id: 'runButton',
handler:function(){
//Ext.getCmp('inputForm').getForm().submit();
var form = Ext.getCmp('inputForm').getForm(); // or inputForm.getForm();
var el = form.getEl().dom;
var target = document.createAttribute("target");
target.nodeValue = "_blank";
el.setAttributeNode(target);
el.action = form.url;
el.submit();
}
检查这个
相关代码段:
form.submit({
target : '_blank',
url : 'refdata/exportToXLS.do'
});
“提交”页面是什么意思?这只是一个说它成功的页面,还是会根据用户提交的表单显示一些搜索结果/信息?@jaitsu:也许他想将表单提交到新的窗口/选项卡,就像这样
你最好使用Ajax提交,然后成功打开一个页面