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

      0  

    Default Answered: DomQuery Pseudo Classes

    Answered: DomQuery Pseudo Classes


    The documentation for Sencha Touch 2 at
    http://docs.sencha.com/touch/2-0/#!/api/Ext.DomQuery

    lists several pseudo classes that can be searched for using DomQuery.
    I can't seem to get E:first to work. Ultimately, I want to loop through the records in the result set I get from the success function.

    If I can get E:first to work, I should be able to get E:last to work, and use E:nth(n) to loop.

    What am I doing wrong?

    HTML Code:
    success: function(response){
         xmlResponse=response.responseXML;
         console.log(Ext.DomQuery.select('Resource:first',xmlResponse));
    }
    Here is the error message I am receiving:
    Uncaught Error: SYNTAX_ERR: DOM Exception 12

    Also, if I leave off :first, it returns the entire result set.
    Last edited by danrosshoward; 1 Aug 2012 at 6:44 AM. Reason: included error code

  2. I couldn't get :first to work but I did get :first-child to work for me.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,107
    Vote Rating
    453
    Answers
    3157
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    I couldn't get :first to work but I did get :first-child to work for me.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

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

      0  

    Default


    me too. thanks

Tags for this Thread