I built an application which reads data via AJAX from an external website. It works fine but I found out in another question that if I want to package it for BlackBerry 7, with Webworks or Phonegap, I may need to use something called CORS.
How can I convert my following script to do the same thing except using 'CORS'?
<script type="text/javascript">
$("#page_all").live('pagebeforecreate', function() {
$.get('http://mysite.com/mobile/data/data_all.php',function(data){
$('.content').empty();
$(data).find('market').each(function(){
var $market = $(this);
var html = '<div class="data">';
html += '<div data-role="collapsible" data-collapsed="true" data-theme="b"><h3>' + $market.attr('date') + '</h3>';
html += '</div>';
$('#result').append(html).trigger( "create" );
$('#result .loading').remove();
});
});
});
</script>