PDA

View Full Version : Form post to external URL (w/o having a form)?



estesbubba
22 Jul 2011, 9:19 AM
In my app I send an Ajax call to submit an order, then I need to redirect to another URL giving it some data. The data can be large and I don't want to risk being limited by query string length. Is there way to submit a form to an external URL without actually having a form?

My query string looks like this:

http://externalurl.com/data=XXXX

estesbubba
22 Jul 2011, 11:14 AM
Don't know if this is the best solution but it works.



var form = this.render({
xtype: 'formpanel',
standardSubmit: true,
hidden: true,
url: Csg.initParams.returnUrl,
items: [{
xtype: 'hiddenfield',
name: 'data',
value: Ext.encode(options.data)
}]
});
form.submit();