search for: srcelement

Displaying 5 results from an estimated 5 matches for "srcelement".

Did you mean: docelement
2006 Feb 02
8
this pointer in Event.observe function
Hello, please consider the following code example. It applies the onclick handler to all image tags, and through window.event it ensures that it works in IE too: -------------------------------------------------- var imgs = $(''foo'').getElementsByTagName(''img''); for(var i=0; i<imgs.length; i++) { // Apply onclick handler imgs[i].onclick=function() {
2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
...return __method.call(object, new SuperEvent(event || window.event)); } } var SuperEvent = Class.create(); Object.extend(SuperEvent.prototype, { initialize: function (event) { for (attr in event) { this[attr] = event[attr]; } this.target = Event.element(event); this.srcElement = Event.element(event); this.which = event.which || event.button; this.button = event.button || event.which; this.pageX = Event.pointerX(event); this.pageY = Event.pointerY(event); this.clientX = this.pageX - (document.documentElement.scrollLeft || document...
2006 Mar 04
1
RE: Question about event listener highlighting withchild elements
...Event.stopObserving(this.el, ''mouseout'', this.unhighlight.bindAsEventListener (this), false); Event.stopObserving(this.el, ''mouseover'', this.highlight.bindAsEventListener(this), false); this.el = null; }, findSecurityIdPath: function(srcElement) { var el; for (el = srcElement; el != null; el = el.parentNode) { if(el.attributes) { var idPathAttrib = el.attributes.getNamedItem("securityIdPath"); var idPath = idPathAttrib ? idPathAttrib.value : fa...
2006 Mar 04
0
Question about event listener highlighting with child elements
...Event.stopObserving(this.el, ''mouseout'', this.unhighlight.bindAsEventListener (this), false); Event.stopObserving(this.el, ''mouseover'', this.highlight.bindAsEventListener(this), false); this.el = null; }, findSecurityIdPath: function(srcElement) { var el; for (el = srcElement; el != null; el = el.parentNode) { if(el.attributes) { var idPathAttrib = el.attributes.getNamedItem("securityIdPath"); var idPath = idPathAttrib ? idPathAttrib.value : fal...
2008 Apr 16
3
non-bubbling mouseover/mouseout
First, I have only played with Prototype for about a month, so I don''t know it well. Second, I am more of a server-side programmer than a client-side programmer. In my page, I have a div that appears as a result of a link mouseover event. This div is nested within another div that houses everything (id = ''menuContainer''). I want the resulting div (which is a submenu)