Connecting Tech Pros Worldwide Forums | Help | Site Map

picture preview not working in firefox

pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#1: Oct 14 '08
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

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Oct 14 '08

re: picture preview not working in firefox


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.
pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#3: Oct 14 '08

re: picture preview not working in firefox


Quote:

Originally Posted by acoder

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....
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Oct 14 '08

re: picture preview not working in firefox


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.
pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#5: Oct 14 '08

re: picture preview not working in firefox


Quote:

Originally Posted by acoder

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 ...
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#6: Oct 14 '08

re: picture preview not working in firefox


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.
Reply


Similar JavaScript / Ajax / DHTML bytes