its a known bug in Chrome .. i reported the issue a few weeks ago ... It also happens when watching multiple classnames and invoking them
Something like $$('.someClass').invoke('observe','click',function(e) { alert('Clicked me'); }); <div class="someClass">1 </div> <div class="someClass">2 </div> <div class="someClass">3 </div> <div class="someClass">4 </div> <div class="someClass">5 </div> will only observe the last element with classname=someClass Regards Alex ----- Original Message ----- From: "laurin1" <[EMAIL PROTECTED]> To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com> Sent: Saturday, November 15, 2008 7:14 AM Subject: [Proto-Scripty] Re: Chrome, Object and each() > > Like I said, this code works just fine in IE, but in Chrome, it does > not work. > >> $aEle = $('TicketOptions').getElementsByClassName('LoadChecks'); >> $aEle.each(function($s){ >> if($s != $sEle) $s.checked = false; >> }); > > > No error in the browser, but the JS debugger stops with: > > uncaught exception TypeError: Object #<an Object> has no method 'each' > > > This is practically right out of the documentation for Prototype. I > use this all the time in IE. I don't understand what the problem is. > It seems that Chrome can retrieve the array of objects (elements), but > it will not apply the prototyped methods (any of them, each(), inspect > ()), to these. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---