I'm having an issue retrieving the type of a control if it is a Combobox. All other control types work fine but the combobox always gets reported back to me as type "text". Here is some trimmed down, generic code that will illustrate what I am trying to do. This javascript is placed in a shared JS file that is executed on every page and will be invoked any time a person presses down or enter on their keyboard.
Thanks in advance.
document.onkeydown = function (e) {
e = e || window.event;
if (typeof e != 'undefined') {
var tgt = e.target || e.srcElement;
// If the keypress was ENTER (13) or DOWN (40)
if (e.keyCode == 13 || e.keyCode == 40) {
// Determine which element we're currently on
currentField = e.target;
alert(currentField.type);
}
}
}
Thanks in advance.