1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    41
    Vote Rating
    -1
    Periyasamy A is an unknown quantity at this point

      0  

    Default Unanswered: how to get component object from el: HTMLElement id

    var textField2 = Ext.create('Ext.form.field.Text', {
    fieldLabel : 'LastName',
    name : 'last'
    // id:'lastid'
    });

    el: HTMLInputElement
    <input id="
    textfield-1040-inputEl" type="text" size="1" name="first" style="width:100%>

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    112
    Answers
    346
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default

    Try this:
    Code:
    var cmp = Ext.getCmp( el.id.replace(/-[a-z]+$/i, '') );

Thread Participants: 1