||View All MessagesBack to WebFX|
I am trying to change the functionality of the HTML <select><option> tag. What I am trying to do is allow non-experienced users of the system to click multiple items in a list without needing to press the CTRL button, i.e. left click item to select, on any number of items, and then click on any highlighted/selected item to unselect it. Make sense?
I have been playing about with the code and it's not quite there. My first question is; is there a way to get the current item that been clicked? I thought that in a 'for loop' of all the items in the list, element.selected would get me what I wanted, but this doesn't seem to work on the very first time some one clicks an item.
Once I have the selected element I simply store that element.index in an array, iterating over the array to then highlight/select item in the list on the page. When someone clicks on an item that is already highlighted/selected, I remove the item from the array before returning.
If any of this makes sense, then I would greatly appreciate any help people can offer.