image preview before file upload

I have file upload element <input type="file" ...> on my form to let user upload images.
I need preview functionality, when user clicks "Browse..." on file upload element he can select image to be uploaded, but before whole form is submitted I want to show preview of the image in the user client browser (before uploading). HTML and client side javascript please.
amakalskiAsked:
Who is Participating?
 
bradleylandConnect With a Mentor Commented:
Javascript is not allowed to access files in the local directory structure. It's a security constraint. The only way you can get this functionality on the client is through an activex object.
0
 
dfu23Connect With a Mentor Commented:
bradleyland is correct ...

you can show the image via the web page only by using a plug-in or uploading the image to your site ...

the other possibilty is to mention to users that have Windows XP they can switch to Thumbnail View when they click to browse for an image.
0
 
amakalskiAuthor Commented:
okey, thank you
0
All Courses

From novice to tech pro — start learning today.