Page 1 of 1

$ajax redirect issue

Posted: 17:12, 02 Mar 2016
by dbrendon
Hello,

I have modified the example TI CC2650 sensor demo so that it makes an ajax call to a REST web service under certain conditions. I have confirmed the web service runs (it creates a WorkOrder in the system), but the ajax call always executes the 'error' call back - not the 'success' callback. The response does not contain the expected json message.

This is the response from the error callback:
{"readyState":0,"responseText":"","status":0,"statusText":"error"}

[EDIT]
Some additional information: the jqXHR.state() is 'rejected'

In the error callback I added a log message for location.href:
LOG: location.href: https://us-west-2-deploy.evothings.com/hyper/..... /index.html
/[EDIT]

I have tested the web service call with SOAPUI and it always completes successfully and returns the expected json message.

From my investigation I suspect that this has something to do with a redirect - or with access-control-allow-origin.

Can anyone provide a suggestion to overcome this issue? Or to further confirm the nature of the error?

Thank you,
- David

ajax redirect issue

Posted: 07:59, 03 Mar 2016
by WalterEt
I have already done this with the same results. This issue only started to happen after this recent update. How can i solve it?

Re: $ajax redirect issue

Posted: 17:42, 03 Mar 2016
by dbrendon
WalterEt wrote: This issue only started to happen after this recent update.


Which update are you referring to?
Is it possible to revert to an older version?

Thanks,
- David

Re: $ajax redirect issue

Posted: 22:11, 04 Mar 2016
by dbrendon
<bump>