View Full Version : jQuery developer -> ExtJS: How to select multiple elements then do something to each

23 Sep 2010, 9:18 AM
Hey guys,
I haven't had a ton of experience with the DOM using ExtJS, I'm very familiar with jQuery. I know this is possible, I'm obviously just missing what ExtJS calls this, but I want to do something like the following:

1. I have a fieldset with an id of 'fieldset1'
2. There are 10 textfields withing this fieldset.
3. I am using a toggle control outside of this fieldset which I want to enable or disable each field.

Why am I not just calling disable on the fieldset itself? Because I don't want it to gray out the entire fieldset, I need it readable and clean. In face, I have custom CSS that takes the border and background off the field when disabled, and returns it when enabled.

So, in jQuery I'd just do this:

How do I do this in ExtJS?
I've seen Ext.query(), but how do I work with each element it returned?

23 Sep 2010, 9:40 AM
var x = Ext.getCmp('fieldset1');

23 Sep 2010, 10:18 AM
Ext.select("#fieldset input").methodOfExt.Element


Ext.select("#fieldset input").set({disabled: true})