Click to See Complete Forum and Search --> : Here's a tough one... anyone?


mitya
06-08-2004, 06:21 AM
Or at least I think it's tough.

I have an onSelect event in my code, relating to a textarea, but I can't find how to get an onDeSelect event. That is, I want some code to activate when the selection is lost.

Is there anyway - direct or inventive - to do this?

Thanks in advance.

batfink
06-08-2004, 07:42 AM
Would onBlur work for you?

mitya
06-08-2004, 08:13 AM
Nah tried it, thanks anyway.

Reckon I might try some hybrid of onMouseUp and a condition to check for whether any text is selected or not. That wouldn't work for selecting via keyboard, though (shift + cursors).

batfink
06-08-2004, 12:14 PM
There is a handler called onSelectionChange but this is IE5.5+ only.
How about onChange?