title: ajax retrieving all files from a server
body: <p>Hi im having a bit of trouble with an AJAX get call from my server. </p>
  
  <p>The goal is im trying to retrieve all files from a directory on my server to then auto populate them into a js treeview but i keep getting this error:</p>
  
  <pre><code>GET http://url/app/webroot/files/?_=1347870792047 403 (Forbidden) jquery.min.js:4
  f.support.ajax.f.ajaxTransport.send jquery.min.js:4
  f.extend.ajax jquery.min.js:4
  (anonymous function) index:2095
  f.Callbacks.o jquery.min.js:2
  f.Callbacks.p.fireWith jquery.min.js:2
  e.extend.ready jquery.min.js:2
  c.addEventListener.B
  </code></pre>
  
  <p>and the code im using to get the files is as follows:</p>
  
  <pre><code>$.ajax({
              url: "http://url/app/webroot/files/",
              type: 'GET',
              cache: false,
              dataType: 'html',
              timeout: 100000,
  
              success: function(data, textStatus, xhr) 
              {
                  $('#tree1').tree({
                  data: data
                  });
              }
  </code></pre>
  
  <p>If i specify a file within this folder i can retrieve it but how do i retrieve all the files within this directory?</p>
  
  <p>Thanks in advance!</p>