Maybe faking the ctrl-event isn't the thing to do (if it is even possible). I 
would try

- Listening to the click event on the select / each option element (perhaps 
using delegation)
- On click of each option, set it's "selected" attribute to "selected" or true 
(or removing the attribute if it is already selected)
- And you might have to call "preventDefault" on the passed Event instance the 
listener to stop the default behaviour of deselecting other elements.

Not sure if this would work though, and I'm already suspecting IE issues...

Michal.


On 13 Sep 2010, at 13:26, Divyan wrote:

> I don't know the answer to this question, but maybe somebody can be of
> help with my question with a similar sort of event-problem:
> 
> For a multiple selectbox you have to hold down the ctrl-key + click to
> select multiple items.
> I want to avoid to hold down the ctrl-button, so that I can select
> multiple elements with only a click of the mouse on each element I
> want to select.
> 
> In short:
> 
> How can I fake the ctrl-down-event to bind with the click event on
> specific elements?
> 
> I tried to make a custom event, but I can't seem to get grip on it.
> Thanks

Reply via email to