2

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 ????

TekTimmy
  • 3,066
  • 2
  • 29
  • 33

2 Answers2

4

Check this sencha forum link

The relevant code snippet:

    form.submit({
        target : '_blank',
        url  : 'refdata/exportToXLS.do'
    });
weeksdev
  • 4,265
  • 21
  • 36
1

have you fix your problem,.. because I see your question was 2 days ago..

this is how i define the form :

var inputForm = new Ext.FormPanel({
   id:'inputForm',
    method : "POST",
    url : "blablabla.php",
    items : [{...}]
    //standardSubmit : true // i do not need standardSubmit
});

and my button,

  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(); 
  }
Egy Mohammad Erdin
  • 3,402
  • 6
  • 33
  • 57