I'm trying to select all the <input> elements of a form except ones with IDs containing the words foo or bar. How can I do this using ExtJS 2.3.0? I've tried the following:
Ext.query("select,input:not([id*=foo][id*=bar])", "SomeForm");`
... but it doesn't work. Excluding IDs with foo in them seems to work fine:
Ext.query("select,input:not([id*=foo])", "SomeForm")`
I'm just not sure how to add a second ID substring. Any Ideas?
Not sure how to combine a selector like this but I think if you use the filter function you can filter out the first query:
Ext.DomQuery.filter(Ext.query('input:not([id*=foo])','SomeForm'),'input:not([id*=bar])');
Notice that I just played around a bit more with this and that function works:
Ext.query('input:not([id*=foo]):not([id*=bar])');
but this gives me the same error you mentionned:
Ext.query('input:not([id*=foo]):not([id*=bar])','SomeForm');
So it seems to me like a bug with the ExtJS query function when you pass a specific root with multiple attribute selectors.
Ext.query("select,input:not([id*=foo]):not([id*=bar])", "SomeForm")` try this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With