1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    10
    Vote Rating
    0
    z1nkum is on a distinguished road

      0  

    Default Empty value of form field after submit

    Empty value of form field after submit


    In fp = new Ext.FormPanel i have this:

    Code:
    {
                xtype: 'hidden',
                id: 'flat_id',
                name: 'flat_id',
                value: ''     
    }
    also I have Save button:

    Code:
    buttons: {
                text: 'Save',
                id: 'saveBtn',
                disabled: true,
                handler: function(){
                    if(fp.getForm().isValid()){
                      Ext.getCmp('flat_id').value = Grid.getSelectionModel().selections.keys[0];
                      console.log("success on %o", fp.getForm().items);
    	                fp.getForm().submit({
    	                    url: 'upload.php',
    	                    success: function(fp, o){
    	                        imgds.reload();
    	                    }
    	                });
                    }
                }
            }
    In console.log I see right current value of grid row index
    But in POST I see empty flat_id

    Is this bug or my fault?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Setting a property of a Javascript object will not affect the contents of an HTML input field.

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    10
    Vote Rating
    0
    z1nkum is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    Setting a property of a Javascript object will not affect the contents of an HTML input field.
    OMG! Thanks!

    Solution:

    Code:
    Ext.getCmp('flat_id').value = Grid.getSelectionModel().selections.keys[0];
    
    to
    
    document.getElementById('flat_id').value = Grid.getSelectionModel().selections.keys[0];

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, that's one of the many ways to skin this cat!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."