# Javascript and XML

**URL:** <https://forum.kirupa.com/t/javascript-and-xml/269784>\
**Category:** web dev\
**Created:** [September 1, 2008, 5:43pm UTC](https://forum.kirupa.com/t/javascript-and-xml/269784 "2008-09-01T17:43:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![winstonSmith](https://avatars.discourse-cdn.com/v4/letter/w/b77776/32.png) [@winstonSmith](https://forum.kirupa.com/u/winstonSmith)\
**Post date:** [September 1, 2008, 5:43pm UTC](https://forum.kirupa.com/t/javascript-and-xml/269784/1 "2008-09-01T17:43:54Z")

</div>

Hello  
I am having a problem loading an XML file into an external Javascript function.  
What I am attempting to do is have one server (which I will not have access to) call an external javascript file on the other server.  
The external javascript will load an xml file on the same server, generating a random record in the xml to read. The xml will have attributes in each record for an image name and a url.  
Basically it is just a banner with properties randomly loaded from an xml file.  
The problem I am having is that the javascript will not read the xml file once it has been run on the other server.  
Here are the links  
[http://www.affordablecruisestours.com/xml/readwrite/touristAds.xml](http://www.affordablecruisestours.com/xml/readwrite/touristAds.xml)  
[http://www.thenextclick.ca/afford/test.html](http://www.thenextclick.ca/afford/test.html)  
[http://www.affordablecruisestours.com/touristPostads.js](http://www.affordablecruisestours.com/touristPostads.js)

Right now I am just using two arrays to get the image and url but once I get the xml working I will replace the arrays with the xml.

Help on this would be GREATLY appreciated!
