Hi,

I am trying to register an event on an object. Basically, there is a
pulldown, and based on the value, I want to display one of two <tbody>
elements, or if "none" is selected, hide them both.

Here is my code:

        document.observe('dom:loaded', function() {
                Event.observe('selectBox','change', function() {
                                if(this.selected=='tbody1') 
{$('tbody2').hide();$
('tbody1').show();}
                                else if(this.selected=='tbody2') 
{$('tbody1').hide();$
('tbody2').show();}
                                else if(this.selected=='none') 
{$('tbody1').hide();$
('tbody2').hide();}
                        }
                }
        );

Nothing happens when I change the selectBox, and firebug doesn't bark
out any errors.

Michael

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to