I have a form with some selection lists that will show / hide more input fields when certain values ββare selected.
The problem is that most users are people with data entry, so they actively use the keyboard when entering data, and the change list selection event fires only when the focus leaves the input, if it is done from the keyboard. I tried adding the same functionality to keypress and keydown , and they work fine, but not in IE.
Unfortunately, my users are mostly government employees, so they are forced to use IE, does anyone know a workaround?
Here is my code:
$("div.error_editor select.refReason").live({ 'change': function() { var text = $(this).find(":selected").text(); $(this).parent().siblings("span").toggle(); }, 'keypress': function() { $(this).change(); } });
EDIT: this doesn't seem to work in Chrome either, but works fine in Firefox
Jimmy source share