Results 1 to 3 of 3

Thread: ????????????????????????

  1. #1
    Ext JS Premium Member kuro's Avatar
    Join Date
    Mar 2009
    Posts
    34
    Vote Rating
    0
      0  

    Default ????????????????????????

    Example?http://www.sencha.com/deploy/dev/exa...le-upload.html??
    ?????????????????????????????????
    ??????????????success?failure?????????????result????????
    ??????????????????
    ????????????????????????????

    Code:
    <html>
        <head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
        <title>File Upload</title>
        <link rel="stylesheet" type="text/css" href="http://www.sencha.com/deploy/dev/resources/css/ext-all.css" />
        <link rel="stylesheet" type="text/css" href="http://www.sencha.com/deploy/dev/examples/shared/examples.css" />
        <link rel="stylesheet" type="text/css" href="http://www.sencha.com/deploy/dev/examples/ux/fileuploadfield/css/fileuploadfield.css"/>
        <script type="text/javascript" src="http://www.sencha.com/deploy/dev/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="http://www.sencha.com/deploy/dev/ext-all.js"> </script>
        <script type="text/javascript" src="http://www.sencha.com/deploy/dev/examples/ux/fileuploadfield/FileUploadField.js"> </script>
        <style type="text/css">
            .upload-icon {
                background: url('http://www.sencha.com/deploy/dev/examples/shared/icons/fam/image_add.png') no-repeat 0 0 !important;
            }
        </style>
        <script type="text/javascript">
    
            Ext.onReady(function () {
    
                // ????
                var fp = new Ext.FormPanel({
                    renderTo: 'form1',
                    fileUpload: true,
                    width: 300,
                    frame: true,
                    title: 'File Upload Form',
                    bodyStyle: 'padding: 10px 10px 0 10px;',
                    items: [{
                        xtype: 'fileuploadfield',
                        fieldLabel: 'File',
                        name: 'fName',
                        buttonText: '',
                        buttonCfg: { iconCls: 'upload-icon' },
                        listeners: {
                            'fileselected': function (btn, v) {
                                execUpload(btn, v);
                            }
                        }
                    }, {
                        xtype: 'displayfield',
                        id: 'dsp',
                        value: ''
                    }
                ]
                });
    
                // ??????
                var execUpload = function (btn, v) {
                    Ext.getCmp('dsp').setValue('???????...');
                    fp.getForm().submit({
                        url: 'http://www.sencha.com/deploy/dev/examples/form/file-upload.php',
                        method: 'POST',
                        success: function (f, action) {
                            Ext.getCmp('dsp').setValue('?????????????');
                            var ans = action.result.success;  // ???????????
                        }
                    });
                };
    
            });
        </script>
        </head>
        <body>
            <div id="form1"></div>
        </body>
    </html>

  2. #2
    Sencha - Support Team yuki's Avatar
    Join Date
    Jun 2007
    Location
    Chigasaki, Japan
    Posts
    273
    Vote Rating
    0
      0  

    Default

    ???????????????????XmlHttpRequest???????????????????????responseText?responseXML????????

    ???????????????????responseText?responseXML??????result????????????????????????????????????(Ext.form.Action.processResponse??????
    Ext Japan, LLC [Twitter: @extjapan]
    [Ext JS / Ext GWT????????][????????????][Ext JS???????????????]

  3. #3
    Ext JS Premium Member kuro's Avatar
    Join Date
    Mar 2009
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ???????????????

    ????????????????????????????????????????
    ???????????????

Posting Permissions

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