Thread: Slide Show
View Single Post
Old Mar 26th, 2008, 5:51 PM   #6
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 365
Rep Power: 3 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
Re: Slide Show

Alright I tested the following code on my local Apache server:
<script type="text/javascript">
function httpGetText(aURL) {
  var req = new XMLHttpRequest();
  req.open('GET', aURL, false); 
  req.send(null);
  return req.responseText;
}
document.write(httpGetText('http://localhost/somedir/'));
</script>
I created a temporary directory called 'somedir' and it worked. However, if I added an index.htm file into the directory it just returned that file rather than the list of files. Basically, that means that directory scans can only be performed on server's whose default behavior is to return the list of files within that directory; provided of course there isn't an index page or that it doesn't return a 404 or other such error code.
__________________
You are here to serve the board. So post well... and live. SPAMMING SPEED! GrimBB
grimpirate is offline   Reply With Quote