tags:

views:

41

answers:

1

Hi All,
Please help me.
When selected item is changed in html combobox, I want to cancel the selection change in particular items.
I have tested the following cases (in combination) but not help.

  1. return false from event handler
  2. window.event.returnValue = false; window.event.cancelBubble = true;
  3. event.preventDefault(); event.stopPropagation(); //event = jQuery event

Thanks,
Ant

A: 

A simple workaround may be to simply change the value back to the previous value if the user makes an undesired selection. Of course, if you want an event to fire only on acceptable selections; you will also need to verify the selection before proceeding.

Lachlan McDonald