Cross-platform SDK and HTML5 tools for mobile app development
X
 

fetch data from url HTML/ Native Ui

4 posts / 0 new
Last post
kmarima
kmarima's picture
Offline
Joined: 5 Mar 2012
Posts:
fetch data from url HTML/ Native Ui

So I want to get the xml data from this URL on my HTML5 JS Native UI project 

http://interaqtive-studios.com/labs/LiveNSE/webapi.php

how do i work this out

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
What is the error message you

What is the error message you get?

kmarima
kmarima's picture
Offline
Joined: 5 Mar 2012
Posts:
this is my code... works ok

this is my code... works ok on my browser (chrome) but not on my phone ...
Note that I'm running  native html/js project

the xml isnt valid because my webhost adds some analytics script at the end  but i take care of it in the code.
fetch.addEventListener("Clicked", function()

{
alert('test');
var url = 'http://interaqtive-studios.com/labs/LiveNSE/webapi.php';
$.get({
 url: url,
  dataType: 'text',
 success: function(d){
 //console.log(d)
alert(d);
 },
});
});

 

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
Firstly, it doesn't parse as

Firstly, it doesn't parse as valid XML, but this tutorial shows how to use XML with JQuery.  You need to change their URL (jquery_xml.xml) to yours/

Login or register to post comments