function createTextFields(obj) {
for (var i = 0; i < obj.length; i++) {
dataDump = {};
for (var key in obj[i]) {
dataDump[key] = textField.value;
var callback = function (vbKey) {
return function (e) {
dataDump[vbKey] = e.source.value;
};
}(key);
}
}
globalData.push(dataDump);
}
I create textFields on click of button, each time a new one is created from the object. When i change the First or Second or Third TextFields and click on update... the value get's updated on the fourth or the last TextFields TextField's Object...
The callback is called on change of the TextFields