By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,609 Members | 3,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,609 IT Pros & Developers. It's quick & easy.

picture preview not working in firefox

pradeepjain
100+
P: 563
Hii guys,
I used http://javascript.internet.com/forms...d-preview.html

for picture preview .Its working in IE but not in firefox .and ya he has said directly that works only in IE.how to make it work on firefox
Oct 14 '08 #1
Share this Question
Share on Google+
5 Replies


acoder
Expert Mod 15k+
P: 16,027
JavaScript cannot access the local file system (except in lower security settings/privileges enabled/changed user settings), so the only way (in a normal internet application) is to upload the image and then show the preview from the server-side.
Oct 14 '08 #2

pradeepjain
100+
P: 563
JavaScript cannot access the local file system (except in lower security settings/privileges enabled/changed user settings), so the only way (in a normal internet application) is to upload the image and then show the preview from the server-side.
oh ok..Do you have any example of this which i can refer to....
Oct 14 '08 #3

acoder
Expert Mod 15k+
P: 16,027
You could use an Ajax file upload (example) and then display the uploaded file. If not all previewed files are uploaded, you may want to upload them to a temporary directory which is periodically emptied. You may also want to ask yourself if having an image upload preview is essential.
Oct 14 '08 #4

pradeepjain
100+
P: 563
You could use an Ajax file upload (example) and then display the uploaded file. If not all previewed files are uploaded, you may want to upload them to a temporary directory which is periodically emptied. You may also want to ask yourself if having an image upload preview is essential.

Hey my earlier forms did not have any preview feature users were directly uploading their picture (I had a disclaimer saying that there is no preview option so choose picture properly) .I that of creating a preview function which i can use for later use.Hey what is the standard followed everywhere .As per i have seen preview of picture is shown when i select my picture ...
Oct 14 '08 #5

acoder
Expert Mod 15k+
P: 16,027
You could leave it up to the user. Keep the feature in case users use browsers which allow it or change their settings to allow it.

If you want all users to have this preview feature, another alternative is to post to a new window and display the uploaded file, but then you'd have the problem of pop-up windows.
Oct 14 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.