Now let's talk about <input type = "file"/>, which allows the user to
select a file to upload to the server, which will be sent to server when
submitted. <input Type="file" /> together with the key when given in a browser.
When the user clicks on the browse button a file dialog box and the path name
of the selected files will appear in the field or you can type the path name to
the field.
After type = "file" /> <input to work, you must have a server with a CGI script or some type of scripting languages such as PHP, which will be invoked by the
forms action URL attribute values that will receive entry form file.
Now if the path name exceeds the value of control maxlength attribute specified,
the entire path name of the selected field will still be placed into the field
when selecting a file through the browse button a file selection dialog box, but
you do not need to worry with the maxlength attribute, although because most
browsers ignore attributes currently placed in the /> <input type = "file".
Now if you want to restrict file types that your user's browser that allows
users to choose from, you will need to use attribute tags <form> receive to
complete this. Receive an attribute that can be comma-separated list of MIME
encodings or a number of MIME encodings. User can only choose only the
appropriate type of file that you receive in the value attribute.
Now only accept attributes that are used with the <input type = "file"/> .
If you want to know what MIME stands, which means that the multipurpose Internet
Mail Extensions, I will name only a few MIME encoding since there are many types
of MIME. There are three types of MIME encoding (image / jpeg, text / richtext, and
video / mpeg).
Now is not like other types of form input controls will only work correctly with a specific data encoding and transmission method. Now if you are using type = "file" /> <form> you must set the value tag attribute enctype to multi / form-data and the method attribute value to the post in
Wednesday, July 1, 2009
Welcome to Upload
Subscribe to:
Post Comments (Atom)
0 comments on "Welcome to Upload"
Subscribe in a Reader
Post a Comment