I am trying to display the contents of the upload folder in a div below the upload form before and after the uploads have been completed.

In uploadComplete function of the handler.js I send a request to my server that runs php script that echo the contents of the folder.

Php runs and echoes the contents of the folder but the response text is empty when request.readyState == 4

Am I going about this in the correct way? What is the right way? If I am doing it with the right method -- any thoughts on why the responseText is empty? Or better yet is there an example of this type of functionality somewhere that I could examine?