- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello I got this problem where the ajax request I'm trying to pull didnt work in App Preview running on Android.
<html>
<head>
<title>AJAX and XDK</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0;" />
<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="intelxdk.js"></script>
<script src="xhr.js"></script>
<script>
function doAJAX() {
$.ajax({
type:'GET',
url:'http://mydomain.com/mydata.php/',
success: function (data) {
alert(JSON.stringify(data))
}
});
}
</script>
<style>
body {font-family:arial;background-color:white}
</style>
</head>
<body>
<h3>AJAX Call</h3>
<button onclick="doAJAX()">AJAX Call</button>
<button onclick="navigator.app.exitApp();">CLOSE APP</button>
</body>
</html>
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arianta,
Does it actually fail to return data? We had an issue with JQuery1 where data was returned but an error message was also returned.
Pamela
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page