title: How can I make an html file that lists files in its directory?
body: <p>Here is the problem I am dealing with:</p>
  
  <p>There are very few windows programs that display animated .gif images at the correct frame rate. Probably because they all use the windows libraries (probably .net) to do this, and anyone who has tried viewing an animated gif in I.E. and found that it was playing WAY TOO SLOW knows that Microsoft failed on this spectacularly.</p>
  
  <p>The web browser Chrome is one of the few programs for windows that always plays animated gif's at the correct framerate, so my solution is to create a stand-alone html document to open in Chrome, that can be dropped into a directory and opened in Chrome to thereby display all images in that directory and/or its sub-directories in a picture-viewer style.</p>
  
  <p>So far, my document (gif_view.html) opens an image based on a hard-coded path/file name, zooms this image in/out with the up/down keys, and switches to other hard-coded images with the left and right keys.</p>
  
  <p>What I want is for these image file names to not be hard coded. gif_view.html should use a script to find out what images and sub-directories are in the directory I placed it in, and cycle back and forth through them with the arrow keys. It should also eventually create a list of sub-directories and let the viewer browse them.</p>
  
  <p>Unfortunately, I can't get it to do either of these things on its own, since (for security reasons) JavaScript has no way of looking up the contents of a directory.</p>
  
  <p>Does anyone know of a way to do this? Perhaps another scripting language to handle the left/right keys? Or is there a way to programmatically read the directory with JS that I missed? Or has Microsoft FINALLY released a patch or something to fix the frame-rate problem?</p>
  
  <p>Please keep in mind: this should be a STAND ALONE DOCUMENT with NO external dependencies. A user should just be able to drop in into a folder, open it with a browser, and watch the magic happen. If your solution involves anything outside of the document itself (like say installing Apache and some server-side script to do the file reading) then it is not a solution. I've already tried stuff like that myself. Such external solutions work, but they are each very clumsy for their own reasons.</p>
  
  <p>If anyone has ideas, I'd be grateful.</p>