Can't read RSS feed via jQuery from remote site? WTF?

Soldato
Joined
18 Oct 2002
Posts
15,963
Location
The land of milk & beans
I'm trying to display the latest post from a wordpress blog on a website. The website is on www.mysite.com, the blog is on blog.mysite.com.

Code:
    $.ajax({
        url: 'http://blog.mysite.com/feed/',
        success: function(data) {
            alert(data);
        }
Doesn't work, but if I take a copy of the XML and save it locally it works eg.

Code:
    $.ajax({
        url: '/text.xml',
        success: function(data) {
            alert(data);
        }
WTF is the point of having an RSS feed if it can't be read from a remote site? That's horse ****.

Is there any work arounds?
 
I'm trying to display the latest post from a wordpress blog on a website. The website is on www.mysite.com, the blog is on blog.mysite.com.

Code:
    $.ajax({
        url: 'http://blog.mysite.com/feed/',
        success: function(data) {
            alert(data);
        }
Doesn't work, but if I take a copy of the XML and save it locally it works eg.

Code:
    $.ajax({
        url: '/text.xml',
        success: function(data) {
            alert(data);
        }
WTF is the point of having an RSS feed if it can't be read from a remote site? That's horse ****.

Is there any work arounds?

wouldn't it just be easier to do this with php then use the Jquery to make it fancy after?
 
Back
Top Bottom