0

Possible Duplicate:
Ways to circumvent the same-origin policy

I'm trying to get xml data from this url

http://www.rabodirect.com.au/includes/figures.xml

Here is my simple code:

$(document).ready(function ()
{
   $.ajax({
        url: 'http://www.rabodirect.com.au/includes/figures.xml',
        type: 'GET',
        dataType: 'xml',
        timeout: 10000,
        error: function () {
            alert('Error loading XML document');
        },
        success: function(xml)
        {
          alert(xml);
        }
    }); 
});

But the error alert occurs.

Is there any ideas, why can't I get xml data?

Thanks

Community
  • 1
  • 1
SergeyAn
  • 754
  • 6
  • 9

1 Answers1

0

Your example gives the "No transport" error. It's not possible to access external resources with ajax. You should invoke a local url, which get's and returns the data. See also discussion on http://api.jquery.com/jQuery.get/

Niels Steenbeek
  • 4,692
  • 2
  • 41
  • 50