Quantcast
Channel: How to fix XMLHttpRequest error while loading XML feed form a different domain using jQuery? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to fix XMLHttpRequest error while loading XML feed form a different domain using jQuery?

$
0
0

I need to load an xml feed from vimeo, for this I am using jquery like this:

$(function(){// Get vimeo feed$.ajax({    type: "GET",    url: "http://vimeo.com/api/v2/<my username>/videos.xml",    dataType: "xml",    success: function( xml ) {        $(xml).find( "video" ).each( function() {            console.log( $(this).find( "title" ) );        });    }});});

But I get this error: XMLHttpRequest cannot load http://vimeo.com/api/v2//videos.xml. Origin http://localhost:8888 is not allowed by Access-Control-Allow-Origin.

I am using MAMP if that makes any difference.


Viewing all articles
Browse latest Browse all 2

Trending Articles