[Prototype-core] Event.observe(window, 'load'.. issue not fixed!

2010-04-15 Thread Dziamid
Event.observe(window, 'load', function () { alert('1'); }); Event.observe(window, 'load', function () { alert('2'); }); Firefox, opera alerts 1 then 2, IE alerts 2 THEN 1!! Order is reversed and developeres are puzzled! Why isn't this issue still fixed?! -- You received this message because

[Prototype-core] Event.observe problem

2009-02-26 Thread Yuncong Zhang
I'm using prototype 1.5 I want to click once and update text in two div parts. But I find out when I click the first time, nothing happened; when I click the second time, both div changed. why is that? How can I click only once, change both of these divs. Thank you in advance Yuncong !--

[Prototype-core] Event.observe to pass additional arguments to callback

2008-01-16 Thread Simon Thomas
I've been playing with the Event.observe function as i need it to pass extra arguments to my callback function and keeping 'this' in the scope of the callback function Object. I don't know if theres a better way to do this but thought i would share it here. observe: function(){ var args

[Prototype-core] Event.observe

2007-09-14 Thread Roland
Hi there, Events can be attached multiple times to the same element.. is there a way to prevent this? Something like ... if(!$(el).hasEventAttached()) Event.observe($(el), 'click', function()); ... would be great Any way to achieve this? Roland,

[Prototype-core] Event.observe will destroy the scope of Javascript OOP?

2007-07-12 Thread Paladin
I discovered a funny pheno, which I don't know anyone else has stated this before. Say I define a class: function Cat(){ this.color = yellow; } Cat.prototype.showColor = function(){ alert(this.color) } Cat.prototype.init(){ Event.observe(button, click, this.showColor); }