I'm no wizard, but I just did something similar to what you're doing
(maybe?).
I just added a class to the form elements I was interested in and
then:
$$('#myForm .myClass:first-child').setStyle('background','#ccc');
On Sep 21, 2:58 pm, kesmit <[EMAIL PROTECTED]> wrote:
> That still doesn't work though because if you use multiple selectors
> in the argument to getElement (e.g., "input, select, textarea"), it
> will create a list of all of the first elements (i.e., input), then
> add to that a list of the next elements (i.e., select), and so on. So
> even if a select element occurs before the first input element in the
> document, getElement will still return the input element.
>
> On Sep 20, 7:09 pm, horseweapon <[EMAIL PROTECTED]> wrote:
>
>
>
> > passing a selector to getFirst() is equivalent to using getElement();
>
> > try $(document.body).getElement('...');
>
> > I've done that before and it worked. Wrapping document.body in a $()
> > function is for IE which does not extends elements with mootools
> > functions if they are not grabbed with $(); Same thing with $
> > (event.target) (so usefull)