Pre defined value for <input type="file">

Discussion in 'HTML' started by =?iso-8859-15?Q?Jens_M=FCller?=, Sep 7, 2006.

  1. Hello,

    I would like to have a predifined value for the selection field of file
    upload, as 90% of the Uploads are the same file.

    This does not work:
    <input type="file" name="upfile" value="c:\up.txt">

    Thanks,
    Jens
     
    =?iso-8859-15?Q?Jens_M=FCller?=, Sep 7, 2006
    #1
    1. Advertisements

  2. Jens Müller wrote:
    > I would like to have a predifined value for the selection field of file
    > upload, as 90% of the Uploads are the same file.
    >
    > This does not work:
    > <input type="file" name="upfile" value="c:\up.txt">


    Imagine:

    <input type="file" name="stolen"
    value="C:\myAccoutingSoftware\MyCreditCardDetails.dat" style="display:
    none">

    Browsers don't let authors specify values for file inputs.
     
    David Dorward, Sep 7, 2006
    #2
    1. Advertisements

  3. > Imagine:
    >
    > <input type="file" name="stolen"
    > value="C:\myAccoutingSoftware\MyCreditCardDetails.dat"
    > style="display:
    > none">
    >
    > Browsers don't let authors specify values for file inputs.


    Hmm, makes sence.

    Is it possible via JavaScript?
     
    =?iso-8859-1?Q?Jens_M=FCller?=, Sep 7, 2006
    #3
  4. Jens Müller wrote:
    >> Imagine:
    >>
    >> <input type="file" name="stolen"
    >> value="C:\myAccoutingSoftware\MyCreditCardDetails.dat" style="display:
    >> none">
    >>
    >> Browsers don't let authors specify values for file inputs.

    >
    > Hmm, makes sence.
    >
    > Is it possible via JavaScript?


    No.
     
    Leif K-Brooks, Sep 7, 2006
    #4
  5. Jens Müller wrote:
    > > Browsers don't let authors specify values for file inputs.

    > Hmm, makes sence.
    > Is it possible via JavaScript?


    No ... for the same reason.
     
    David Dorward, Sep 7, 2006
    #5
    1. Advertisements

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. Oodini
    Replies:
    1
    Views:
    2,068
    Keith Thompson
    Sep 27, 2005
  2. Ying Zu
    Replies:
    0
    Views:
    282
    Ying Zu
    Jan 8, 2011
  3. Ying Zu
    Replies:
    1
    Views:
    243
    Magnus Lyckå
    Jan 13, 2011
  4. Jack Bates
    Replies:
    0
    Views:
    442
    Jack Bates
    May 2, 2011
  5. Roberto
    Replies:
    3
    Views:
    480
  6. Replies:
    1
    Views:
    475
    Ryan Davis
    May 6, 2005
  7. Susan Cranford
    Replies:
    2
    Views:
    588
  8. Tarkeshwar
    Replies:
    2
    Views:
    324
Loading...