$('mydiv').select('input','select')[0];
Alex Mcauley
http://www.thevacancymarket.com
----- Original Message -----
From: "Tony Andrews" <[email protected]>
To: "Prototype & script.aculo.us" <[email protected]>
Sent: Tuesday, January 05, 2010 3:17 PM
Subject: [Proto-Scripty] Finding the first form item of any type within a
div
I have already posted a question about this on StackOverflow here
(http://stackoverflow.com/questions/2006432/finding-the-first-
focusable-item-of-any-type-within-a-div) so I won't repeat the whole
thing. My issue is that I want to select the first form item of any
type (input, select etc.) within a div. When I try $('mydiv').select
('input', 'select') for example, it returns all the inputs, then all
the selects. So the first item it returns is not necessarily the
first item in document order: if the first item is a select and the
scond is an input, it will return the second item first. Any ideas?
--------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to
[email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.