The following script will give access is denied error. xmlHttp.open("GET", "temp.xml", true) //temp.xml is a file under the same directory. However xmlHttp.open("GET", "http://www.adobe.com", true) will work fine. What's the problem?
You do not have permissions to access the file. Change it's mod (chmod) or owner (chown) to the appropriate permissions that your server runs with. You can just check the other files on the server and make the temp.xml the same.
access denied implies a browser / method error in retrieval of file, not permission denied from webserver. easly checkable if he requests domainname.com/temp.xml and that works. if opening via domain works, have you tried putting in yours into the request? are you in a subfolder? xhttp also has restrictions for cross-domain actions which result in access denied...
Sorry, i'm testing the script on my computer, not on my server. Can we do test on our own computer of ajax scripts like xmlHttp.open("GET", "temp.xml", true)?
no because that implies the browser can fetch any file from your hard drive. you need to run a local webserver and request your tests through it.