Forum Moderators: open
I am having muiltiple image upload form.Now I want to upload images without referishing page and show progress bar as well.I am new to ajax. I am able to get other fields using post menthod , but unable to get file array to upload the file. I tried lot of examples form net.If anyone can help me out.Its urgent.
First and foremost, it's not urgent. Delivering a baby is urgent. Having surgery to avoid a ruptured appendix is urgent. This is JavaScript.
Secondly, you can't upload files using "Ajax", not strictly speaking. The security model built into JavaScript / XMLHttpRequest doesn't allow it. You can use an iframe [google.com], or you can use one of the Flash alternatives such as implemented in YUI's "uploader" component [developer.yahoo.com].
If the browser allowed javascript access to the file upload form, malicious scripts could use that information to browse through users hard drives, checking for the existence and/or file size of different paths.
As blang pointed out there are solutions. A search in your favorite search engine for "ajax file upload" or something similar will give you plenty of choices. :)