CFMU on complete advanced example
In the last example I introduced you to the on complete attribute for CFMU. Today I want to take it a step further and sprinkle in some jQuery magic. Before we look at some code we should take a look at what we are trying to accomplish. When the uploader loads we are going to add some files to it.
After we hit upload and the files are uploaded we will display our results to the right of the uploader.
Now that we know what we are shooting for lets run through some code. As I said yesterday CFMU has an on complete attribute. This is a string name of the JavaScript method you want to call when the files have been completed. We are also going to create a div that will hold our results
Our log files method automatically gets passed an array of files that have been uploaded. From there we really only need to do 2 things. First our results div is automatically set to hide when the page loads so I want to make it visible. Next using the each function in jQuery we can loop our array. If you remember from yesterday I said you would get passed a ton of info about each file, well 1 of them is the name. For each array item we are going to append the item to our results div.
This example and many more are available in the download so please go check out the project on RIAForge. As always your feedback is welcomed.
