Image Preview in javascript while uploading the images

Discussion in 'Javascript' started by Kumarasamy.Mani@gmail.com, Nov 22, 2005.

  1. Guest

    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
     
    , Nov 22, 2005
    #1
    1. Advertising

  2. > 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?
     
    Joshie Surber, Nov 22, 2005
    #2
    1. Advertising

  3. Guest

    Joshie Surber wrote:

    > > 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?


    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.
     
    , Nov 22, 2005
    #3
  4. VK Guest

    wrote:
    > 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.
     
    VK, Nov 22, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Herfried K. Wagner [MVP]

    Re: Print Preview and images....

    Herfried K. Wagner [MVP], Aug 19, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,082
    Herfried K. Wagner [MVP]
    Aug 19, 2003
  2. Dung Ping
    Replies:
    10
    Views:
    995
    Chaddy2222
    Jan 16, 2006
  3. =?Utf-8?B?am9l?=
    Replies:
    1
    Views:
    378
    =?Utf-8?B?TXVyYWxp?=
    Jul 21, 2006
  4. Replies:
    0
    Views:
    1,005
  5. kiran
    Replies:
    7
    Views:
    2,791
    kiran
    Nov 9, 2011
Loading...

Share This Page