3.2.0

Trigger events of array object

Hi,
I have a requirement(sample code as below) to display and update a group of contacts, so I have defined as an array object.
for(k =0; k<bus.length; k++){
contact_det[k] = new AW.UI.Input;
contact_det[k].setStyle ('top', topoffsets[i+1]);
contact_det[k].setStyle ('left', leftoffsets[j+1]);
contact_det[k].setStyle ('width', '80px');
contact_det[k].setStyle ('height', '17px');
contact_det[k].setId("Bus"+k);
}

But when each "Input" is changed, how to trigger its corresponding events using "onControlValidated".
bus_contact_det[k].onControlValidated = function(text){} will not work, as we need to capture and pass the subscript "k".

Please let me know if there is any other way to trigger these events or should I be just hardcoding the array subscript to 0, 1, 2 etc.

Thanks

Vijay
October 5,

This topic is archived.

See also:


Back to support forum