Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: paul at juniperwebcraft.com (Paul Novitski)
- Subject: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Date: Wed Oct 25 12:58:35 2006
At 10/25/2006 10:44 AM, Matt Warden wrote: >On 10/25/06, Paul Novitski <paul@xxxxxxxxxxxxxxxxxxx> wrote: >> // now act on the object whose behavior triggered >>this function >> var sClass = this.tagName; // etc. > >This is incorrect. In IE, events are executed in the window scope, so >when you do this.tagName, it is equivalent to doing window.tagName. >You must get the target element from the event itself Interesting! I wonder what's causing my scripts to work properly in IE. Do you mean IE 5.5 and earlier? I've been doing all my scripting tests in IE 6 for a long time, and it seems to handle this scope issue the same as Firefox/Mozilla. Regards, Paul
- References:
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Nathan V. Patwardhan
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Matt Warden
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Nathan V. Patwardhan
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Paul Novitski
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- From: Matt Warden
- [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Prev by Date: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Next by Date: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Previous by thread: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Next by thread: [Javascript] Problem w/Javascript, interpolation, functions, onclick
- Index(es):