mpalmerlee/jQuery-UI-Listbox — Issue #3: Validating before highlighting
Author: colinf
Created: 2011-11-23 13:50:19+00:00
State: open

Hi Matt,

This is more a question than an issue really. Do you know if there is an easy way to validate a condition when a user clicks on a JSListBox.Item and conditionally proceed or not based on the condition.

I am trying to prompt the user along the lines of "Do you really want to select this item?" - if they say yes then proceed to act on that selection but if they say no then don't proceed.

I have put code in the onClick property of the JSLIstBox.Item to do the validation and this works in terms preventing executing of the action when the user answers No but the item in the UI that they clicked on still gets highlighted. I want the highlighting to only happen if they say Yes.

Hope this makes sense! Any help would be welcome.

Thanks,
Colin