Convert Ajax/JS based form for mobile app into standard form
The form posts data to a server I do not control. I am having a lot of issues with cross-domain queries etc. When the form posts to the server, the server responds with an XML response that the app must parse and react to accordingly.
The XML response can either be a success or a fail. If it is a success, the XML response will include a URL to redirect to and the app will need to redirect the user to that URL. If it is a fail, it will be for one of two reasons. Either a flat decline or an error. If it is a decline, the app tells the user their application was declined. If it was an error, the app displays the error.
It should be easy enough to read through the file and scripting to see how the form functions.
I am open to how best to do this, but it needs to be built in a manner that does not require CORS.
I have attached the primary file here to make it easier to understand what I need.