Reputation: 181
I've searched around, and there doesn't seem to be a way to read remote RSS files via javascript... specifically in safari
This is more or less what i'm trying to do...
I've tried
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
or
xmlDoc = document.implementation.createDocument("","",null);
and then
xmlDoc.load('http://localhost/drupal/feed');
This is where it breaks though.
Upvotes: 0
Views: 113
Reputation: 4624
If you don't want to roll your own give this a look. It's Google's AJAX Feed lib. I had to load up a blog for a client a few months back and this saved me quite a bit of time.
Upvotes: 0
Reputation: 6244
The first result for "read rss with javascript" in Google is this article, which describes exactly what you intend to do (in a cross-browser way, no less).
The reason the code you pasted above doesn't work is that you're using ActiveXObject
, which Safari doesn't use. Active X objects are an Internet Explorer-only thing. Safari, Firefox, Opera, and other standards-compliant browsers use XMLHttpRequest
.
Upvotes: 1