0

I have one domain with this structure :

1/ http://name.name.com

And another with this kind of structure

2/ http://www.othername.tm.fr

I would like to retrieve an XML file of the second domain (http://www.othername.tm.fr) via XMLHttpRequest and retrieve the datas into the first domain (http://name.name.com)

I've tried many pieces of code but nothing work, any help would be very very appreciated!

PS : I have tried a solution which work perfectly in Chrome but not in IE :/

user990463
  • 439
  • 1
  • 7
  • 27

1 Answers1

0

Did you think of the security feature called Same Origin Policy. That's one of the reason solutions like JSON were developed and are often included into APIs.

pbx
  • 1,137
  • 7
  • 15
  • Yes, but in fact I own these 2 domains and just want to send vars to one and retrieve xml generated from the second one. Do you have a solution with JSON and jquery ? – user990463 Jun 14 '12 at 09:42
  • Yes, but this has nothing to do with the question if you own domains or not. The browser doesn't let you do it. See the referenced wikipedia article in my post for further details. It's impossible to do this with XMLHttpRequest() as far as I know. Have a look at [this post](http://stackoverflow.com/questions/5916682/jquery-autocomplete-xml-cross-site-request) – pbx Jun 14 '12 at 09:48
  • Is there an alternative version (iFrame or i don't know) It just don't work in IE, in Chrome it works perfectly – user990463 Jun 14 '12 at 09:56