View Full Version : How submit form in different browser page?

13 Jun 2012, 2:05 PM

I declare this form. I set standardSubmit:true. When I press button my URL open in the same page browser.
How submit form in new browser page? I think that I must set action.target = '_blank'.
But I don't understand how I do this.

Ext.define('UsersApp.view.reportTableTab', {
extend: 'Ext.panel.Panel',
alias: 'widget.reportTableTab',
frame: true,
title: 'Date Range',
width: 270,
margin : 20,
url: urlSite+urlPHP+'getContentPage.php?siteState=ConfigSiteTab-SaveEMail&json=1',
items:[{xtype: 'datefield',
fieldLabel: 'Check In',
id: 'checkIn',
allowBlank: false},
{xtype: 'datefield',
fieldLabel: 'Check Out',
id: 'checkOut',
allowBlank: false}
buttons: [{text: 'Calculate',
handler: function(btn){btn.up('form').getForm().submit();}}

Thanks, Denis.

14 Jun 2012, 9:32 AM
This is how I did it at one point, although I found that it tends to get blocked by popup blockers. My setup was just for the user to download a file, so I ended up doing it in the same window and it worked fine. But hopefully this can help as a starting point.

buttons: [{
text: 'Submit',
handler: function() {
var form = this.up('form').getForm();
if (form.isValid()) {
target: '_blank'

14 Jun 2012, 11:22 AM
Thank you!!!!! It's work.