Maintaining Scope in JavaScript Event Handlers via a Closure
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
:Posted: 2008-08-29 23:46
:Tags: JavaScript
The example below and its comments should be self-explanatory::
Click me! I keep my value.
Click me! I lose my value.
Frameworks such as YUI must do something similar with their automatic scope correction functionality.