Hi,
There are a few places need to be changed in your code:
1. I am not sure whether you have implemented $find by yourself so that it calls eo_GetObject function or not. Our object is not a DOM element. So you can not use document.getElementById. In general, you should always call eo_GetObject to get an EO.Web client side JavaScript object. You can see here for more details:
http://doc.essentialobjects.com/library/1/clientapi_howto.aspx2. Your for loop syntax is wrong. It should be "for (var i = 0;
i < PostedFiles.length; i++)". Note that such generic coding error is actually outside of the scope of our support. So you may want to enable JavaScript debugging on your browser so that you will be able to catch such errors easily;
3. PostedFile.getClientFileName() is correct but PostedFile.TempFileName is wrong. TempFileName file name is never transferred to the client side for security reasons. As such it is not possible for you to get TempFileName on the client side directly from the uploader.
Hope this helps. Please feel free to let us know if you have any more questions.
Thanks!