1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    wbenroy is on a distinguished road

      0  

    Default Answered: Ext.DomQuery.compile doesn't handle multiple attributes

    Answered: Ext.DomQuery.compile doesn't handle multiple attributes


    This works:
    Code:
    Ext.DomQuery.compile('node[@attr1="value1"]')
    But this doesn't:
    Code:
    Ext.DomQuery.compile('node[@attr1="value1" and @attr2="value2"]')

  2. See: http://www.w3.org/TR/selectors/#attribute-selectors

    Specifically:

    Multiple attribute selectors can be used to represent several attributes of an element, or several conditions on the same attribute. Here, the selector represents a span element whose hello attribute has exactly the value "Cleveland" and whose goodbye attribute has exactly the value "Columbus":

    span[hello="Cleveland"][goodbye="Columbus"]

  3. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,050
    Vote Rating
    657
    Answers
    471
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    See: http://www.w3.org/TR/selectors/#attribute-selectors

    Specifically:

    Multiple attribute selectors can be used to represent several attributes of an element, or several conditions on the same attribute. Here, the selector represents a span element whose hello attribute has exactly the value "Cleveland" and whose goodbye attribute has exactly the value "Columbus":

    span[hello="Cleveland"][goodbye="Columbus"]
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    wbenroy is on a distinguished road

      0  

    Default


    D'oh! I was thinking XPath. Thanks!

Thread Participants: 1

Tags for this Thread