can i upload file without refresh the page


I am new in Yii framework, can anyone tell me how to upload file without refreshing the page? Because i was using Yii fancy box to prompt the input file field and i wish to upload the file without refresh page and after upload will auto close the fancybox, can anyone give me some clue?

use iframe

Thanks for reply, if i use iframe, how do i pass the file value to the controller? i have try once before but it send null value and fail to upload, maybe i have write to wrong code, do you have any sample code for me to reference?

use ext of file uploading…

I normally use swfupload or uploadify… there are other tricks like creating an iframe on the fly and then post to it but I would rather use one as jQuery File Upload, which also uses new file upload features and nice fallback ones. Check it here: