PDA

View Full Version : reading XML response on success



raj_plays
17 May 2012, 10:32 PM
Hi,
After submitting data from my form, I get a status value back from the server.
How can I read this value?
My data format is XML.
The server returns...
"<?xml version=\"1.0\"?><Result><Status>" + server_response + "</Status></Result>"



formPanel.getForm().submit({
waitMsg: 'Uploading image...',
success: function(form, action){
//This is where I want to read the response.responseXML
}


Please help with this.

scottmartin
22 May 2012, 12:44 PM
Have a look at the action object in your console:

console.log(action)

Regards,
Scott.

sword-it
29 May 2012, 6:13 AM
If your response is string XML form in success function, you can use XmlStore to get your response data.
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.data.XmlStore