You must know the attachEvent can only put a function to be a element's event handler, andd in that function "this" should be the element itself, but the internet explorer linked it with window object, and Event.observe doesn't fix this bug, same as $ input's name bug, I think the Prototype library should fix it, my modification: ..... _observeAndCache: function(element, name, observer, useCapture) { if (!this.observers) this.observers = []; if (element.addEventListener) { this.observers.push([element, name, observer, useCapture]); element.addEventListener(name, observer, useCapture); } else if (element.attachEvent) { var f=function(){observer.call(element,window.event)};// this line I add this.observers.push([element, name, f, useCapture]); element.attachEvent('on' + name, f); } }, ......... use closure to fix this bug, I think this should be added into Prototype, any ideas?
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@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-core?hl=en -~----------~----~----~----~------~----~------~--~---