Results 1 to 9 of 9

Thread: window + form panel bug

  1. #1
    Ext User
    Join Date
    Feb 2008
    Posts
    146

    Default window + form panel bug

    there is a bug when submit a form panel in a window

    this is my code and work great under ext 2.2.1

    Code:
    var tabs = new Ext.FormPanel({
        xtype: 'form',
        region: 'center',
        method: 'POST',
    	name: 'sendlinkform',	
        id: 'sendlinkform',
    	buttonAlign: 'center',
        fileUpload: true,
    	labelWidth: 100,
        defaults: {
            width: 250
        },
        frame: true,
       // errorReader: new Ext.form.XmlErrorReader(),
       defaultType: 'textfield',
        items: [{
            fieldLabel: 'Nome',
            id: 'nome',
            name: 'nome',
            allowBlank: false
        }],
        buttons: [{
            text: 'Invia',
    		handler: function(){
    			if (tabs.getForm().isValid()) {
    				tabs.getForm().submit({
    					url: '../../framework/ci/index.php?c=external&m=sendLink',
    					success: function(){
    					   Ext.MessageBox.show({
    				           title: 'Messaggio Spedito...',
    				           msg: 'Il messaggio è stato correttamente spedito.',
    				           buttons: Ext.MessageBox.OK,
    						   animEl: 'animation',
    				           icon: Ext.MessageBox.INFO
    				       });
    						winLink.hide();
    					},
    					failure: function(){
    						Ext.Msg.alert('Invio Fallito', 'Il messaggio non è stato correttamente spedito, riprova.');
    					//win.hide();
    					}
    				});	
    
    			}
            }
        }]
    
    }
    
    var winLink = new Ext.Window({
        title: 'Invia la tua posizione..',
    	closeAction: 'hide',
        closable: true,
        width: 630,
        height: 400,
        plain: true,
        layout: 'border',
        items: [tabs]
    })
    i receive this error "ext-all.js line 7"

    can you help me?

    where is my error? or is a real bug?

    thank you

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Use ext-all-debug.js

    Join date Feb 2008, and you've never wondered what ext-all-debug.js is or what it's for?

    Then post the WHOLE error.

  3. #3
    Ext User
    Join Date
    Feb 2008
    Posts
    146

    Default

    ok sorry...

    this is the error:

    "syntax error"
    ext-all-debug.js (riga 11527)
    doDecode = function(json){
    return eval("(" + json + ')');
    },

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Right.

    So it's throwning an error when evaluating a response from a form submit.

    So you you immediately look at Firebug to check your JSON to see if its valid.

    And?...

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    It's a file upload.

    I assume you read the very carefully worded API docs about file uploads.

    I added the extra info in all places in the API docs that uploads are mentioned, so go and read.

  6. #6
    Ext User
    Join Date
    Feb 2008
    Posts
    146

    Default

    i dont' use json in this submit...

    but yes it is fileupload

    the upload work succesfully in server side, but i obtain and error...

  7. #7
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    And so what doe the API docs say about uploading?

  8. #8
    Ext User
    Join Date
    Feb 2008
    Posts
    146

    Default

    i have read the api

    i don't use JSON i don't submit HTMLENTITES..

    but don't work...

    what is changed from extjs 2.2.1?

  9. #9
    Ext User
    Join Date
    Feb 2008
    Posts
    146

    Default

    ok now works..

    the real problem is the endocing of my php framework..

    sorry

Posting Permissions

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