Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / examples / form / file-upload.html
1 <html>
2 <head>
3     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4     <title>File Upload Field Example</title>
5     <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
6     <script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
7     <script type="text/javascript" src="../../ext-all-debug.js"> </script>
8
9     <link rel="stylesheet" type="text/css" href="file-upload.css"/>
10     <script type="text/javascript" src="../ux/FileUploadField.js"></script>
11     <script type="text/javascript" src="file-upload.js"></script>
12
13     <link rel="stylesheet" type="text/css" href="../shared/examples.css" />
14     <style type="text/css">
15         .upload-icon {
16             background: url('../shared/icons/fam/image_add.png') no-repeat 0 0 !important;
17         }
18         #fi-button-msg {
19             border: 2px solid #ccc;
20             padding: 5px 10px;
21             background: #eee;
22             margin: 5px;
23             float: left;
24         }
25     </style>
26 </head>
27 <body>
28     <h1>File Upload Field</h1>
29     <p>The js is not minified so it is readable. See <a href="file-upload.js">file-input.js</a>.</p>
30
31     <p>
32         <b>Basic FileUpload</b><br />
33         A typical file upload field with Ext style.  Direct editing of the text field cannot be done in a
34         consistent, cross-browser way, so it is always read-only in this implementation.
35         <div id="fi-basic"></div>
36         <div id="fi-basic-btn"></div>
37     </p>
38
39     <p>
40         <b>Basic FileUpload (Button-only)</b><br />
41         You can also render the file input as a button without the text field, with access to the field's value via the
42         standard <tt>Ext.form.TextField</tt> interface or by handling the <tt>fileselected</tt> event (as in this example).
43         <div id="fi-button"></div>
44         <div id="fi-button-msg" style="display:none;"></div>
45         <div class="x-clear"></div>
46     </p>
47
48     <p>
49         <b>Form Example</b><br />
50         The FileUploadField can also be used in standard form layouts, with support for anchoring, validation (the
51         field is required in this example), empty text, etc.  This example also demonstrates using the
52         <tt>buttonCfg</tt> option to provide a customized icon upload button.
53         <div id="fi-form"></div>
54     </p>
55 </body>
56 </html>