PDA

View Full Version : AJAX Cross Domain



ameikle
10 Jan 2007, 2:02 PM
Does anyone have a solution for retrieving an XML file on a different domain?

Herm
10 Jan 2007, 3:30 PM
You can use a proxy script on the server that is serving your app. That server can go out and get the xml file from another domain and serve it back to your application clients.

In the Layout examples (online in docs and in the 0.33 download) you'll find a Feed Viewer example. It has a feed-proxy.php script that goes and gets rss from 3rd party domains and serves it back to the app.

ameikle
10 Jan 2007, 4:13 PM
Problem is i'm using IBM Lotus Domino and php won't run on domino.

tryanDLS
10 Jan 2007, 4:19 PM
There are non-PHP solutions to this problem. The dev forum for yui on yahoo.com discusses some alternate solutions. If no one else here suggests an alternatvie, google cross domain XHR or cross domain Ajax

Herm
10 Jan 2007, 10:30 PM
Gizzmo wrote a proxy for his Domino server in this post http://www.yui-ext.com/forum/viewtopic.php?t=837 . As you will see, he implemented it as a servlet. I guess you could also do it in native Domino too with a Java agent (but LotusScript is hard because you don't have methods to access the network to do stuff like GetURL etc).

ameikle
11 Jan 2007, 1:06 PM
Tim/Herm -- Thank you for your responses, I will try both your suggestions

tryanDLS
12 Jan 2007, 1:03 PM
Another good resource for XMLHttpRequest discussion is on Ajaxian
http://ajaxian.com/by/topic/xmlhttprequest/