View Full Version : Reading Form Post data in ExtJs app redirected from another domain/application

10 Feb 2015, 12:32 PM
Scenario : URL x is sending form data in post method to URL y.

x is a web application, y is our Sencha web application.

y should retrieve the form data and display the viewport.

My guess is to write some kind of XMLHttpRequest in my app.js launch or initial view port before view controller or something to read the form post data and proceed with Ext.create(myviewport).

I see the formdata in HTTP header via chrome developer tool, but XMLHttpRequest getAllResponseHeaders does not show this form data in my javascript alert.

Are there any best practice approach for this?

Much appreciate the help.

PS: We do not want to pass the data in queryString or write a PHP API for this.

Gary Schlosberg
10 Feb 2015, 12:54 PM
How about JsonP?

10 Feb 2015, 1:04 PM
Gary, thanks for your response.

The JsonP proxy is useful when you need to load data from a domain other than the one your application is running on.

I am not trying to pull data from domain x into domain y.

Domain x fires and forgets. Domain y (our Sencha ExtJS Web App) needs to receive that FORM POST data from its header.

Also, this is more like service-on-demand - when a user in domain x needed to access domain y, user clicks a button in domain x to jump to domain y.

Did some research on, looks like data posted from page in domain x is sent to server y not to the client browser resolved by domain y. So we needed a server side scripting in our ExtJS app in domain y to read that form data.

Any help from the experts, please.