title: XMLHttpRequest Object wants to .open file one folder up?
body: <p>I have an <code>XMLHttpRequest</code> Object that is trying to access a file outside of it's folder.</p>
  
  <p>W3Schools says that: For security reasons, modern browsers do not allow access across domains.   </p>
  
  <p>This means that both the web page and the XML file it tries to load, must be located on the same server.  </p>
  
  <p>So, my file is on the same server. just in a different directory (folder.) It’s not reading the file. Is there a workaround for this?   </p>
  
  <p>The javascript file works perfectly when the .xml file is located in the same folder. However, I want to access it from outside the folder - one directory up. i used the syntax ../ to indicate that it is located one file up. it doesn't seem to get access to it... </p>
  
  <p>1 works perfectly with myFile.xml located in the same folder. </p>
  
  <p>2 does not seem to be able to locate myFile.xml in the directory that the folder is located in. </p>
  
  <p>Using the direct path does not work. </p>
  
  <p>1.)    xmlhttp.open("GET", "myFile.xml", true);</p>
  
  <p>2.)    xmlhttp.open("GET", "../myFile.xml", true);</p>
  
  <p>[EDIT - Update] solved. It works. Exactly as is. I moved the files over to the host server from my desktop folder. I still don't know why there's a different outcome from the desktop environment... but, I'm glad to know I was coding it correctly. </p>