Nilesh, thanks for the advice.

I am no longer attempting to emulate click / dblclick events for <option>
elements, I have attached these events to the <select> instead as it's
obviously far better.
The problem is actually that in IE, the click / dblclick event handlers are
executed *before* the elements' attributes are updated, so I cannot work out
which element is actually selected.

I have tried using select.selectedIndex, the :selected pseudo-selector (on
the options) and @type=selected on the options, all of these yield the same
results that they provide the element selected before the click.

rob

On 4/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


If you are messing around with Options and want to allow Double clicks
to them, then use the Select tag to do it on.

for example add the Dbl click action the the Main Select tag vs teh
Options tag, and use selectedIndex to findout what Options tag is
selected, and you should be table to move it  from one Select to other
Select area.

I think someone made a plugin swapping items in side Select menu
(options , add ,drop,move) check the plugin page on jquery.com

so on the dblk click on Select tag, code would be soemething like...
(off top of my head, not 100% sure, get you get the idea..)

$(this).find('[EMAIL PROTECTED]').appendTo('#someOtherSelectTag');

so the above would look then select menu to find any item highlighted
and move them to another selece menu that has id=someOtherSelectTag

hope that help,
Nilesh

On Apr 2, 11:58 am, "[rob desbois]" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've just discovered something I didn't know: IE (6) does not generate
> click / dblclick events for <option> elements.
>
> I'm creating some code to work around this issue (which will be made
> available when complete), but have a further problem in that when IE
> calls the <select>'s click handler, it does this *before* updating
> the .selectedIndex property, hence you cannot tell which item has been
> double-clicked on.
>
> I could use a timer to get around this problem but it's a bit of a
> hack; does anybody have a better idea otherwise?
>
> rob




--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.

Reply via email to