Function getting called on the load of page
<pre><code>for (var key in obj[i]) {
    dataDump[key] = textField.value;
    var callback = function(zeKey){
       return function(e){
          dataDump[zeKey] = e.source.value;
       }; 
    }(key);
    textField.addEventListener('change', callback);
}
</code></pre>

<p>When I load the window, this function gets called automatically, which I don't want and instead I want this to be called only when I do a change.</p>

<p>The main point is calling <code>function(zeKey){...}(key)</code>. When you do so, key, which is a string is copied as a parameter (zeKey) to your anonymous function.</p>
