potatotsang
asked on
capture highlighted text. how?
in IE, can anyone propose me how to capture the text highlighted by dragging the mouse?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
var range=document.selection.c reateRange ();
alert(range.text);
will give you the selected text.
alert(range.text);
will give you the selected text.
ASKER
ic thx..
i have wasted my time in browsing thru the events.
missed the seleciton object.
thx alot.
i am new to the modern object model of IE.
looking forward to give u more points =)
Spud->Regards();
i have wasted my time in browsing thru the events.
missed the seleciton object.
thx alot.
i am new to the modern object model of IE.
looking forward to give u more points =)
Spud->Regards();
Glad I could help :-)
var range=document.selection.c
rangeText="<b>"+range.text
range.text=rangeText;
does the trick.