Hi all,
I'm generating a new element through javascript upon initializing a
class. This element needs to react to an onclick event.
Is there a difference in using this:
element = document.createElement("li");
element.onclick = this.handleClick.bindAsEventListener(this);
$('container').appendChild(element);
rather then this:
element = document.createElement("li");
$('container').appendChild(element);
Event.observe(element, 'click',
this.handleClick.bindAsEventListener(this));
If so, what is it, and which solution should I favor.
(From what I understand skimming through the code, Event.observe()
deals with IE leakage by using an onunload event, while the first
solution would not, is this correct?)
Thanks and best regards,
Tobie
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs