extjs: open a new window when FormPanel submit function is used

TekTimmy picture TekTimmy · May 27, 2011 · Viewed 9.4k times · Source

Heya, i'm creating a Formpanel:

inputForm = new Ext.FormPanel({
    id:'inputForm',
    frame: true,
    closable:true,
    collapsible:true,
    renderTo:'somewhere',
    layout:'anchor',
    standardSubmit:true,
    method: 'post',
    items:[{ ... }]
)};

and use this submit button:

  text:'run',
  id: 'runButton',
  handler:function(){
         Ext.getCmp('inputForm').getForm().submit();
  }

how can i open the submit page in a new window/tab ????

Answer

weeksdev picture weeksdev · Oct 23, 2015

Check this sencha forum link

The relevant code snippet:

    form.submit({
        target : '_blank',
        url  : 'refdata/exportToXLS.do'
    });