I have the following script to highlight a row in table when a
checkbox is checked.  I need to adapt it to work with many rows where
the id = 5day_#.  The number is equal to the arbitrary row id I am
getting from the database.  Is there a way to insert a wildcard in the
element name or am I just going about this from the wrong direction?

            $('5day').observe( 'click', function(event) {
                        if ($(Event.element(event)).checked) {
                                    $(Event.element
(event).parentNode.parentNode).addClassName('5day');
                        } else {
                                    $(Event.element
(event).parentNode.parentNode).removeClassName('5day');
                        }
            });

--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to