Multiple selected text in textbox

asked 2012-02-11 06:33:15 +0800

sowmiyaksr gravatar image sowmiyaksr


Am trying to do, text highlighting..

If i enter a word in one textbox, the occurence of word in another textbox should be highlighted.
Even if there are multiple occurences.

I know this can be done with label/button and Johann's jquery-highlight plugin.

Since i need onSelection event to be captured, i can use only textbox..
Because only input elements supports onSelection .

Is there any way to do this?



delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-02-11 10:37:34 +0800

siva477 gravatar image siva477

Hi Sowmiya,

Can you give me an Example in a code level , what you really want to do....

With Regards,
Siva Kumar.M

link publish delete flag offensive edit

answered 2012-02-11 11:20:01 +0800

sowmiyaksr gravatar image sowmiyaksr

updated 2012-02-13 11:01:29 +0800

@Siva Kumar - Thanks for your reply. This is what am trying to do.

<textbox id="textTobeHighlighted">
<attribute name="onOK">
            String toHighlight = textTobeHighlighted.getValue();
            /*code to highlight all the occurences of "toHighlight" in textbox "text"*/

<textbox id="text" multiline="true" rows="10" ></textbox>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2012-02-11 06:33:15 +0800

Seen: 120 times

Last updated: Feb 11 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More