var selects = $('yourTable').getElementsByTagName("tr")[1].getElementsByTagName("td")[1].getElementsByTagName("select");

...getElementsByTagName returns a zero-indexed collection, therefore, get the 2nd row's 2nd cell's selects with the above line...



On 7/27/06, Javier Martinez <[EMAIL PROTECTED]> wrote:
but I want a concret element
for example, I have a table with 2 rows and 2 cells every one

[1][2]
[3][4]

On all cells, there are <select> controls, but I only want to get the <select>'s on cell 4.
How you will do this?


PD: at this time I get the cell 4 ( crossing the DOM ) and apply a false class "temp". Then I make $$( "temp" ) and get the references I want. But maybe there is an easy way to do it.


2006/7/27, Martin Ström < [EMAIL PROTECTED]>:
Just use $$("td select") and you'll get all select tags that are
children of td tags.

Martin
burnfield.com/martin

On 7/27/06, Javier Martinez < [EMAIL PROTECTED]> wrote:
> Is there a way to select objects inside an object?
> For example I have a <td> element with <select> fields inside. How can I
> select these fields if the td haven't id, but I can find it on the dom
> easily
> Is there something like the "$$" operator but without class or ids?
>
> Thanks
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs



_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to