having a form with a dhmtxcombo in it, and an event:
onObj.attachEvent(“onKeyPressed”,ChangeLookup);
in previous library version I got the name of the field using this.name;
in version 4 it seems I did something wrong; where is the mistake?
I tried with this.id and this.name … doesn’t seem to work …
which is the correct name of the property to get the field firing the actual event?
function ChangeLookup(keyCode,controlFlag,shiftFlag)
{ window.alert(this.name)
lkpValue=this.getComboText();
}
I use it during a form-input with various fields;
for this field, which is a combo, I get the object and attach the event of keypressed;
so I am sure, when it is fired, it comes from a combo-type-field
the event fires, and now I’d like to know what is the name of the calling object (I could have 2 or more combofields in my input form);
I’m almost sure it worked in former 3.6 version using “this.name”, but now it always says “undefined” … where am I wrong?
after 1 day of tests, I finally got the solution (personally I’m thinking previous version did the handling the easier way!);
as it could be helpful to someone else, this is the way
for a combo-object (between other form-objects, in this case), I set the event