1. Create a separate class that has your
highlight/unhighlight behavior in it, and extend just the element you want to
highlight with that class… like this (also allows you to easily apply
this behavior elsewhere when you need it in the future): Object.extend(this.el, HighlightBehaviorClass.prototype) 2. When defining your event handlers,
assign them to variables so you have a handle to properly dispose of them, like
this: this.mouseOver_Listener = this.highight.bindAsEventListener(this); Event.observe(this, “mouseover”,
this.mouseOver_Listener); …now this will work… Event.stopObserving(this, “mouseover”,
this.mouseOver_Listener); From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Casey O'Neill I have created a
_javascript_ object which is initialized for some input fields, fieldsets, and
divs on the page. With each object i attach a mouseover and mouseout event that
highlights and un-highlights. Also on mouseout i am trying to display the id of
the object to a console. The highlighting works except for cases when an object
is the child of another object. In this case both are highlighted and only the
parent's id is currently. I want only the child to be highlighted and the
child(not parent) id to be displayed. The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. |
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs