1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    3
    Vote Rating
    0
    atma is on a distinguished road

      0  

    Question Unanswered: getAttribute is missing?

    Unanswered: getAttribute is missing?


    Hi!
    I'm trying to get an attribute with Ext.Element.getAttribute('some-attr') but always get undefined.
    For example:

    Code:
    var ml  = Ext.fly('ux-element').getAttribute('margin-left');
    console.log(ml);
    or
    Code:
    var el = Ext.get('ux-element');
    var ml = el.getAttribute('margin-left');
    console.log(ml);
    What I doing wrong?
    And another question. Why in Ext core is absent getMargin (like a getPadding or getBorderWidth)?

  2. #2
    Ext User
    Join Date
    Jan 2009
    Posts
    3
    Vote Rating
    0
    atma is on a distinguished road

      0  

    Default


    I've been stupid...
    Code:
    el.getStyle('margin-left');