File Name Validation when Uploading Images

Discussion in 'Javascript' started by JonChart, Sep 25, 2003.

  1. JonChart

    JonChart Guest

    Hi all,

    I would like to know ho to validate a file name when uploading via asp and
    whether or not this can be validated with javascript?

    I need to upload 2 images and the file names must be the same...

    1) browse for 1st image.
    2) image path and file name appears in text box i.e. IMAGE1.JPG
    3) browse for 2nd image.
    4) 2nd image file name MUST match the file name in the text box of 1st image
    i.e IMAGE1.JPG.

    Hope this is clear...

    How can this be done.

    Many thanks,

    Jon
     
    JonChart, Sep 25, 2003
    #1
    1. Advertisements

  2. not exactly what you want, but is a head in the right direction - this
    checks that the file is indeed an image file, add more extensions as you
    like

    PP

    -----

    var picPat = "^.*(\.(gif|jpg|bmp))$";

    ------



    "JonChart" <> wrote in message
    news:vSJcb.27$...
    > Hi all,
    >
    > I would like to know ho to validate a file name when uploading via asp and
    > whether or not this can be validated with javascript?
    >
    > I need to upload 2 images and the file names must be the same...
    >
    > 1) browse for 1st image.
    > 2) image path and file name appears in text box i.e. IMAGE1.JPG
    > 3) browse for 2nd image.
    > 4) 2nd image file name MUST match the file name in the text box of 1st

    image
    > i.e IMAGE1.JPG.
    >
    > Hope this is clear...
    >
    > How can this be done.
    >
    > Many thanks,
    >
    > Jon
    >
    >
    >
    >
     
    Psybar Phreak, Sep 27, 2003
    #2
    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. Replies:
    0
    Views:
    570
  2. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    1,132
    Roedy Green
    Jan 2, 2006
  3. Dung Ping
    Replies:
    10
    Views:
    1,399
    Chaddy2222
    Jan 16, 2006
  4. ding feng
    Replies:
    2
    Views:
    3,264
    ding feng
    Jun 25, 2003
  5. Mike Schilling
    Replies:
    2
    Views:
    741
    Arne Vajhøj
    Mar 5, 2010
  6. JonChart

    File Name Validation when Uploading Images

    JonChart, Sep 25, 2003, in forum: ASP General
    Replies:
    2
    Views:
    179
    Ray at
    Sep 26, 2003
  7. Collin Moore
    Replies:
    2
    Views:
    205
    Bertram Scharpf
    Oct 15, 2009
  8. James Kuyper
    Replies:
    2
    Views:
    321
    James Kuyper
    Dec 23, 2012
Loading...