Image Preview in javascript while uploading the images

K

Kumarasamy.Mani

Hi all,

I'm having the following issue in image preview.

I'm having an File Upload option in my web page, there i'm having one
more option preview. When the user is uploading the image using the
input box, i need to show preview of the image. When i'm using in MSIE
it's working fine but in Netscape Browser's it's not working at all.
This is my logic in Javascript

function changeImg() {

document.getElementById("imgPreview").src =
document.UploadForm.uploadFile.value

}

This is not working in Netscape Browsers. My Suspect is there is
problem in the path. When this logic is in Local machine it's working
fine. When im putting in my server it's not working fine from local
machine

Thanks in Advance
Kumarasamy.M
 
J

Joshie Surber

document.UploadForm.uploadFile.value

I don't believe Gecko lets you script the values of a upload widget.
Security restrictions and all. I may be wrong though, perhaps someone
else knows better than I?
 
K

Kumarasamy.Mani

Joshie said:
I don't believe Gecko lets you script the values of a upload widget.
Security restrictions and all. I may be wrong though, perhaps someone
else knows better than I?

Any way i'm not altering any values of file upload controls. I'm taking
the values and changing the image tag's src value. I think that's not a
problem.
 
V

VK

Any way i'm not altering any values of file upload controls. I'm taking
the values and changing the image tag's src value. I think that's not a
problem.

You are linking a system resource (and any local file is a system
resource) to the page loaded from the Internet. You cannot do it in the
standard security environment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top