Professional Web Applications Themes

HTML + <input type=file> constraint doesnt work - ASP

Hi I'm trying to input image file using this synax. <input type=file name="tx_file" accept="image/*" class=boxText> But when open file dialouge appears, it shows all the file and user can select any file and i.e. i dont want. Can any one suggest me? Cheers, Bhavin...

  1. #1

    Default HTML + <input type=file> constraint doesnt work

    Hi
    I'm trying to input image file using this synax.
    <input type=file name="tx_file" accept="image/*"
    class=boxText>
    But when open file dialouge appears, it shows all the
    file and user can select any file and i.e. i dont want.
    Can any one suggest me?
    Cheers,
    Bhavin
    Bhavin Guest

  2. #2

    Default Re: HTML + <input type=file> constraint doesnt work

    Gazing into my crystal ball I observed "Bhavin"
    <anonymousdiscussions.microsoft.com> writing in news:06da01c39865$7392df70
    $a601280aphx.gbl:
    > Hi
    > I'm trying to input image file using this synax.
    ><input type=file name="tx_file" accept="image/*" class=boxText>
    > But when open file dialouge appears, it shows all the
    > file and user can select any file and i.e. i dont want.
    > Can any one suggest me?
    > Cheers,
    > Bhavin
    >
    [url]http://www.cs.tut.fi/~jkorpela/forms/file.html[/url]

    --
    Adrienne Boswell
    Please respond to the group so others can share
    [url]http://www.arbpen.com[/url]
    Adrienne Guest

  3. #3

    Default Re: HTML + <input type=file> constraint doesnt work

    > Hi
    > I'm trying to input image file using this synax.
    > <input type=file name="tx_file" accept="image/*"
    > class=boxText>
    > But when open file dialouge appears, it shows all the
    > file and user can select any file and i.e. i dont want.
    > Can any one suggest me?
    Yes, use client-side JavaScript to make sure the value of the field has the
    proper extension before they can submit.


    Aaron Bertrand [MVP] Guest

  4. #4

    Default Re: HTML + <input type=file> constraint doesnt work

    "Bhavin" <anonymousdiscussions.microsoft.com> wrote:
    >Hi
    >I'm trying to input image file using this synax.
    ><input type=file name="tx_file" accept="image/*"
    >class=boxText>
    >But when open file dialouge appears, it shows all the
    >file and user can select any file and i.e. i dont want.
    >Can any one suggest me?
    The "name" attribute of the <input type="file"...> is read-only. If
    you could assign a value to it, then you could upload *any* file from
    *any* client's computer without the user being aware of what was going
    on.

    You can check the value the user has given the attribute when the form
    is submitted (or each time the value is changed, though that kind of
    thing can get messy).

    --
    Tim Slattery
    MS MVP(DTS)
    [email]Slattery_Tbls.gov[/email]
    Tim Slattery Guest

  5. #5

    Default Re: HTML + <input type=file> constraint doesnt work

    Hi, Bhavin

    [url]http://www.pstruh.cz/util/upload/Upload-Images-FileSize-Unique-Notification[/url].
    ASP

    (see client-side script)

    Antonin

    "Bhavin" <anonymousdiscussions.microsoft.com> wrote in message
    news:06da01c39865$7392df70$a601280aphx.gbl...
    > Hi
    > I'm trying to input image file using this synax.
    > <input type=file name="tx_file" accept="image/*"
    > class=boxText>
    > But when open file dialouge appears, it shows all the
    > file and user can select any file and i.e. i dont want.
    > Can any one suggest me?
    > Cheers,
    > Bhavin

    Antonin Foller Guest

Similar Threads

  1. html <input type="file"> can you set a value first ?
    By J?J in forum Macromedia ColdFusion
    Replies: 2
    Last Post: March 27th, 03:42 PM
  2. HTML + <input type="File">
    By Bhavin in forum ASP
    Replies: 2
    Last Post: October 22nd, 03:21 AM
  3. Replies: 3
    Last Post: October 18th, 06:56 AM
  4. Replies: 2
    Last Post: October 16th, 08:29 AM
  5. input type=file
    By Paul Moffitt in forum ASP
    Replies: 4
    Last Post: August 28th, 06:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139