Apollo and Ajax/Spry (XMLHttpRequest) possible?
Now I did not get as much time to look at it as I hoped, but even so I already have come to a roadblock.
The following code works wonders when called from a page under the ulseth.no domain:
<script type="text/javascript" src="js/SpryData.js"></script>
<script type="text/javascript">
var dsPhotos = new Spry.Data.XMLDataSet("http://ulseth.no/spry1/photos.xml", "/gallery/photos/photo");
</script>
<ul spry:region="dsPhotos">
<li spry:repeat="dsPhotos">{dsPhotos::@path}</li>
</ul>
But when run from my local machine it generates an error:
Exception caught while loading http://ulseth.no/spry1/photos.xml: Permission denied to call method XMLHttpRequest.open
Any suggestions as to how I should/could move on would be highly appreciated.


Anyway, browsers won't allow an off-domain Javascript remote request . The reason it works from ulseth.no is because Spry is calling a file on ulseth.no. From your local machine, the domain is "Localhost", so only local files can be requested.
In retrospect, if you think about it for a second, the reasoning makes sense. But it took me an afternoon of Googling to figure it out when I first ran into that issue.
HTH
However, I wonder why I cannot access a test.ppp.com site. It doesn't like the prefix on the domain. Anyone else had this problem?
Thanks, let me know if you have made any progress on this.
Something like this:
<?php
/*
You can use this script to pass-through almost any rss/xml feed from an external server to another.
Just insert the url to external playlist below and copy this file to your server.
You can use the XML soure "external_feed.php" in your HTML feed this script to the spry component.
*/
// build file headers
header("content-type:text/xml;charset=utf-8");
// refer to file
readfile("http://www.YourURL/Path/To/Xml/Here");
// that's all
exit();
?>