I use javascript to simulate a disabled select element. I can't turn it off since .net validators don't work, but that's a different story.
I have the following function:
function preventFocus(e) { if ($(this).hasClass("disabled")) { e.preventDefault(); this.blur(); } }
It is called:
$("#ProvinceID").toggleClass("disabled").bind('focus click dblclick', preventFocus);
Double-clicking on the selection field in IE still allows you to display and select items. I tried the IE developer toolbar and e.type appears as focus and dblclick. Is this an IE bug, or do I need to catch some other event? I also tried to focus.
Thanks!
source share