![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I'm having difficulty using attachEvent instead of simply assigning to mouseover in my object Sample03. When i use myImage.onmouseover = this.showmouseover(); in the following all works fine, if I replace it by myImage.attachEvent('onmouseover',this.showmouseov er()); I get for the alert(this.id) "undefined" and not "gwlogo" |
#2
| |||
| |||
|
|
webgour schrieb am 10.06.2008 17:01: I'm having difficulty using attachEvent instead of simply assigning to mouseover in my object Sample03. When i use myImage.onmouseover = this.showmouseover(); in the following all works fine, if I replace it by myImage.attachEvent('onmouseover',this.showmouseov er()); I get for the alert(this.id) "undefined" and not "gwlogo" http://www.quirksmode.org/js/events_advanced.html "The event handling function is referenced, not copied, so the this keyword always refers to the window and is completely useless." |
#3
| |||
| |||
|
|
webgour schrieb am 10.06.2008 17:01: I'm having difficulty using attachEvent instead of simply assigning to mouseover in my object Sample03. When i use myImage.onmouseover = this.showmouseover(); in the following all works fine, if I replace it by myImage.attachEvent('onmouseover',this.showmouseov er()); I get for the alert(this.id) "undefined" and not "gwlogo" http://www.quirksmode.org/js/events_advanced.html "The event handling function is referenced, not copied, so the this keyword always refers to the window and is completely useless." |
![]() |
| Thread Tools | |
| Display Modes | |
| |