Hi,

I'm trying to get the text from the first <TD> of every <TR> in the
<TBODY> of my table.
To make it trickier I also would lke unique items.

This is what I have so far that works, but I feel like there should be
a cleaner way of doing it.

My table id is 'search'
I want to dump the contents into a div named 'distinct'

                var events = new Array();
        var rows2 = $('search').down('tbody').childElements();

        rows2.each(
                function(e) {

                if (e.down('td').down('a').innerHTML.toLowerCase().include
(sk.toLowerCase()))
                {
                        events.push(e.down('td').down('a').innerHTML);
                }
                }
        );

        rows2.clear();


        events.uniq().each(function(e) {
                $('distinct').insert(e);
        });

        events.clear();



Thanks,
Joel

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to