Page 4 of 5

Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 1:47 am
by Robert Larsen

From Chrome Image


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 1:50 am
by maxkatz

Expand the object and you should see the entire content.


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 2:13 am
by Robert Larsen

Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 2:21 am
by maxkatz

Your error is in responseText


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 2:40 am
by Robert Larsen

so would I write (response text error not found) in the java?


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 3:27 am
by maxkatz

You would be using JavaScript.


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 3:40 am
by Robert Larsen

Could you show me how to write the code?


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 4:54 am
by maxkatz

jqXHR.responseText

or

jqXHR.statutText


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 5:01 am
by Robert Larsen

Ok, tried writing that on service complete event and that did not work. Do I need to write that code to a local variable, or somewhere else?


Display service response error message on application as an alert.

Posted: Tue Nov 19, 2013 5:28 am
by maxkatz

Just that won't work... it should be:

alert (jqXHR.statusText);

or

console.log(jqXHR.statusText);

I'd definitely recommend to try some basic JavaScript tutorials before you start building mobile apps in Appery.io