Forum /
Related Projects /
Ext.air for Adobe AIR /
AIR : Ext.Ajax.request not working
AIR : Ext.Ajax.request not working
I'm trying to build an AIR app to access remote data but Ext.ajax.request fails :
"Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)"
I looked into the ExtDocs AIR app and saw that there was a call to http://extjs.com/playpen/api.php when searching in the API (using an HttpProxy)
How does it work ?
Sencha - Community Support Team
you'll have to use scriptag proxy to do cross-domain requests.
cross-domain requests are allowed in AIR apps (eg the ExtDocs app)
the eval function is not allowed and I wondered how Jack make ajax requests work in the ExtDocs app
Sencha - Community Support Team
Sencha User
Does the new version of Ext get around this?!
Sencha Premium Member
AIR sandboxes for AJAX development
AIR sandboxes for AJAX development
You might be interested in this blog series I did which outlines how to use Ext in an AIR app. It all comes down to Adobe's security model. Here's the link, it's a five part series but the first part may be all you need as it contains links at the bottom to Adobe docs:
http://dev.aol.com/blog/bricemason/a...syncing-part-1
thanks bricemason for your article,
however I found that the ajax request worked well, the problem was I used Ext.decode to decode the response, the security issue was there
How did you work around the decode issue? I also want get the response as JSON and actually need to decode it.
Eval with a JSON string is allowed in air 1.0.
if you need more "eval" set up the browser sandbox by using an iframe
Thanks for reply, I only need JSON evaluation.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us