views:

26

answers:

2

I've added the code for an AJAX call in my mobile widget but I don't get a response. Any ideas?

$.ajax({
    type: "GET",
    url: "http://www.tfl.gov.uk/tfl/syndication/feeds/disruptions-tube-offset-now.xml",
    dataType: "xml",
    success: function(xml) {}
});
+1  A: 

The response is inside the success function

success: function(xml) {}

Unless there is a failure.

Daniel Moura
A: 

You have to make sure your config.xml contains the security tag and network="public" attribute inside widget tag:

<security>
  <access>
    <host>tfl.gov.uk</host>
  </access>
</security>
Radu Cojocaru