Hybrid View
-
24 Oct 2011 6:20 AM #1
Submit form to new window (using standardSubmit: true)
Submit form to new window (using standardSubmit: true)
I'd like to POST a form directly to a php script on the server, so I'm using
"standardSubmit: true".
So far so good.
But I'd also like to see the response in a new browser window.
How do I do this ? I've seen a number of recipes which were written for Extjs 3.x but clearly dont work in 4.+
I've tried to add a 'target' parameter or even baseParameter either to the form or as argument to the submit, but to no avail.
Has anyone got an example that works with Extjs 4.0 ?
OK no replies. This usually means I'm asking the wrong question, so can I ask:
Does anyone have a working example of a form submission using a standardSubmit that opens a new window, i.e. 'target = _blank', (Extjs 3.0 or 4.0) .Last edited by jsalisbury; 25 Oct 2011 at 1:13 AM. Reason: Widen the audience!
-
25 Oct 2011 7:14 AM #2
shameless bump.
shameless bump.
Can someone put me out of my misery on this ?
-
31 Oct 2011 3:19 AM #3
Solution Found...
Solution Found...
In the end, this worked for me with Extjs 4.0.2
1. FormPanel config:'standardSubmit: true'2. Submit button handler with it own submit statement, with target: '_blank' config:
Ext.getCmp('formid').getForm().submit({target: '_blank'});( Adding a target parameter anywhere else as (say) params, baseParams, or form params is irrelevant).
-
29 Dec 2011 1:18 AM #4
-
12 Apr 2012 4:43 AM #5
Thanks for posting your answer - saved me too!
-
13 Nov 2012 9:54 AM #6
I'm not certain how I missed this thread while searching. This was vital to me, as well. I did notice some interesting behavior in Chrome (I have not tried other browsers yet) when getting the form component two different ways:
Doing it this first way, you get a new tab
this.up('form').getForm().submit({target:'_blank',params:{selEmpId:empidArray}});
Doing it this second way, you get a new window
Ext.getCmp('tsDatesRangeMaster').getForm().submit({target:'_blank',params:{selEmpId:empidArray}});


Reply With Quote