I'm using XMLHttpRequest to grab data from an external xml file: I get the data just fine but I cant' grab the external .js file for my slide show. I'm trying to get the tags #id='rotator' and id='cycle'. My code can't read it. PLEASE HELP. Thanks.html file:\[code\]<div id="rt-mainbody"> <div class="component-content"> <div class="rt-leading-articles"> <div class="rt-article "> <div class="rt-article-bg"> <div class="rt-headline"> <div id="content" class="clearfix home"> <div id="hero"> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "index2.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; var x = xmlDoc.getElementsByTagName("rotatingImages/item"); for (i = 0; i < x.length; i++) { document.write("<div id='rotator'><div id='cycle' class='clearfix'><div class='entry clearfix'>"); document.write("<div class='hero-image clearfix'>"); var imgSrc = http://stackoverflow.com/questions/12604674/x.getElementsByTagName("image")[0].childNodes[0].nodeValue; document.write("<img src='" + imgSrc + "' target='_blank'>"); imgSrc = http://stackoverflow.com/questions/12604674/x.getElementsByTagName("image")[0].childNodes[0].nodeValue; document.write("</div></div></div>"); document.write("<div id='hero-cycle' class='clearfix'><div id='hero-nav'>"); document.write("<ul><li class='hero-text'>"); document.write("<div class='hero-info clearfix'>"); var linkValue = http://stackoverflow.com/questions/12604674/x.getElementsByTagName("description")[0].childNodes[0].nodeValue; var linkValue = http://stackoverflow.com/questions/12604674/x.getElementsByTagName("filePath")[0].childNodes[0].nodeValue; document.write("<a href='" + linkValue + "' target='_blank'>"); linkValue = http://stackoverflow.com/questions/12604674/x.getElementsByTagName("description")[0].childNodes[0].nodeValue; document.write(linkValue); document.write("</a>"); document.write("</div>"); document.write("<a class='page' href='http://stackoverflow.com/questions/12604674/#'></a></li></ul></div></div></div>"); } </script> <!--end-rotating-images--> <!-- End rotatorText #3 --> <div id="annc_controls"> <a href="http://stackoverflow.com/questions/12604674/#" id="play"> <img src="http://stackoverflow.com/questions/12604674/images/blue_play.gif" alt="Play" border="0" style="vertical-align: text-bottom"/></a> <a href="http://stackoverflow.com/questions/12604674/#" id="pause"> <img src="http://stackoverflow.com/questions/12604674/images/blue_pause.gif" alt="Stop" border="0" style="vertical-align: text-bottom"/> </a> </div> <!--<div id="slideNavigation"></div>--> </div> <!-- /#hero-nav --> </div> <!-- /#hero-cycle --> <!-- /#hero --> </div> </div> <div> </div> </div> </div> </div></div>\[/code\].js file: \[code\]` jQuery(document).ready(function() { var pauseClicked = function(){ $('#cycle').cycle('pause'); $('#play').attr("style", "display:block"); $('#pause').attr("style", "display:none"); $('#pause').removeClass("active"); return false; }; var playClicked = function(){ $('#cycle').cycle('resume'); $('#pause').attr("style", "display:block"); $('#play').attr("style", "display:none"); $('#pause').addClass("active"); return false; }; $('#play').attr("style", "display:none"); $('#pause').attr("style", "display:block"); $('#cycle').cycle({ fx: 'fade', speed: 500, timeout: 6000, pager: '#slideNavigation', pagerClick: pauseClicked }); $('#pause').click(pauseClicked); $('#play').click(playClicked); $("#slideNavigation a").focus(function() { $(this).blur(); }); });jQuery('#cycle').cycle({ fx: 'fade', speed: 1000, timeout: 5000, prev: '#prev', next: '#next', pager: '#hero-nav ul ', pagerAnchorBuilder: function(idx, slide) { return '#hero-nav li:eq(' + idx + ') a.page'; } }); var version = jQuery.browser.version;if (version instanceof Object){version=version.number();}`\[/code\]XML file:\[code\]`<?xml version="1.0" encoding="utf-8"?><homepage> <rotatingImages> <item> <image>manage/newImages/soldier-sunset.jpg</image> <description>My Test 1</description> <filePath>http://www.sigar.mil/newsroom/spotlight/12/2012-sep-05-sopko-visits-afghanistan.html </filePath> </item> <item> <image>manage/newImages/2012-04-03-jet.jpg</image> <description>My Test3</description> <filePath>http://www.sigar.mil/newsroom/spotlight/12/2012-sep-05-sopko-visits-afghanistan.html </filePath> </item> <item> <image>manage/newImages/sigar-brochre.jpg</image> <description>My Test2 </description> <filePath>http://www.sigar.mil/newsroom/spotlight/12/2012-sep-05-sopko-visits-afghanistan.html </filePath> </item> </rotatingImages> </homepage>`\[/code\]