Results 1 to 4 of 4

Thread: submit from error

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Posts
    2

    Default submit from error

    Hello all!

    I have simple upload file form.
    When I submit form I get error like submit was failed, but i know that submit was successful.

    My form :
    PHP Code:
    {xtype'form',  name'form',
        
    items: [{
            
    xtype'filefield',
            
    name'filename',
            
    fieldLabel'File name:',
            
    labelWidth50,
            
    msgTarget'side',
            
    allowBlankfalse,
              
    anchor'100%',
            
    padding10,
            
    buttonText'Select file...'
        
    }],

        
    buttons: [{
            
    text'Load',
            
    handler: function() {
                var 
    form this.up('form').getForm();
                  var 
    window this.findParentByType('window');
                if(
    form.isValid()){
                    
    form.submit({
                        
    url'!onepages.xml',
                          
    method'POST',
                          
    params:{xml13},    
                        
    errorReader: new Ext.data.XmlReader({
                            
    record'row',
                            
    success'STATUS'
                        
    },
                        [
    'STATUS']),    
                        
    waitMsg'Loading...',
                          
    failure: function(formaction)
                        {
                            
    Ext.Msg.show({title:'Error'msg:'Error load file'buttonsExt.MessageBox.OKiconExt.MessageBox.ERROR});
                                },
                    
    success: function(form,action){                                         
                                    
    window.close();
                                }
                    });
                }
            }
        }]
      } 
    Server response

    HTML Code:
    <?xml version="1.0" encoding="UTF-8"?> 
    <message success="true"><xmlpage> <result_rows>1</result_rows>
     <result>
    <row>   <STATUS>true</STATUS>  </row> 
    </result> </xmlpage></message> 
    What is wrong?

    Any ideas ?

    E

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    So the client says it failed, but the server is getting the data?

  3. #3
    Sencha User
    Join Date
    Nov 2009
    Posts
    2

    Default

    Correct

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Perhaps this thread will help:
    http://www.sencha.com/forum/showthread.php?266288

Tags for this Thread

Posting Permissions

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