11.13.2012

ExtJS, formpanel, and new windows on submit

I struggled a bit trying to figure out how to, when submitting a form from a formpanel in ExtJS, have the destination page open in a new window.  I found the answer in a post on the Sencha forums, but it took me several hours to find for some reason.

The key is in the submit button on the form.  You need to add an extra parameter.

This way of doing it gets you a new tab in Chrome

this.up('form').getForm().submit({target:'_blank',params:{selEmpId:empidArray}});


This way of doing it gets you a new window in Chrome

Ext.getCmp('tsDatesRangeMaster').getForm().submit({target:'_blank',params:{selEmpId:empidArray}});

0 comments: