WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Single Click <option>, Lister Storm, April 29, 2005
     Re:Single Click <option>, Erik Arvidsson, May 22, 2005
     Re:Single Click <option>, Joe, April 29, 2005
         Re:Single Click <option>, Lister Storm, May 3, 2005

Subject: Single Click <option> From: Lister Storm Date: April 29, 2005

Hi guys,

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.



Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX