- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to acces JSON-data on another server. My code works in the emulator and without the XDK (simply on a local webserver) but on my device it fails to get the JSON data.
I've added the following to the head in my index.html:
<script src="intelxdk.js"></script> <script src="xhr.js"></script>
My javascript code is the following:
function get_market_list(){ var url = "xxxxxxxxxxxxxx"; $.getJSON(url, function(result, status, jqXHR){ var data = $.parseJSON(jqXHR.responseText); var mlist = '<ul data-role="listview" data-inset="true">'; $.each(data.response, function(index, val){ mlist += '<li><a href="#" class="ui-btn" data-transition="slidefade" name="market_item" id="' + val.symbol + '">' + val.name + '</a></li>'; }); document.getElementById("mlist").innerHTML = mlist + '</ul>'; }); }
The config-files have the default value:
<access origin="*"/>
Using Intel XDK: 3240
Everything works correct in: Chrome Browser on Laptop, Chrome Browser on Mobile Device (Android)
Don't know what settings I'm missing?
Kind regards,
Bart
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see this FAQ > https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail < it likely is the source of your issue.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see this FAQ > https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail < it likely is the source of your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul! You're THE Best! Thx!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page