I'm a newcomer to prototype but every time I try to run the
following...

document.observe('dom:loaded', function() {
  $$('.single .addcomment .comment').each(function(element){
    element.observe('click', function(event){
      $$('.addcomment').each(function(elementz){
        elementz.update("TEST2");
    });
      element.parentNode.update("TEST");
    });
  });
});

I get an error "Uncaught TypeError: Cannot call method 'update' of
null". Can you please help I'm trying to reset every .addcomment
element to say TEST2 except for clicked element to say TEST, but only
one element at the time can say TEST.

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