07-23-2012 11:41 AM
You must whitelist the URL of the external domain in the config.xml document. WebWorks allows cross-domain access (unlike the browser) as long as the URL is trusted.
07-23-2012 12:43 PM
If you can control the serverside too (e.g. it's your own backend), I'd also take this information about cross-site HTTP requests into consideration.
Altough you won't need it if you use your AJAX requests only in wrapped WebWorks apps, but it helps when you test stuff on your regular PC or smartphone browser.
In many cases you just add one line to your HTTP headers. In PHP this might look like this:
<?php header('Access-Control-Allow-Origin: *'); [... your code ...]