1 Reply Latest reply on Jan 16, 2008 7:51 PM by Sergey Smirnov

    Selecting Text in a Textarea box

    Josh Augustin Newbie

      I am having a textarea control which contains a string. And I have the two textboxes, Start and Stop. Whenever I put my cursor in the textarea, the Start textbox should be populated with the index position of cursor on the String and I select some text without releasing the mouse. So the Stop textbox should be filled by the new cursor position. Can anyone please tell me how I can do that. I saw the example in the RichFaces LiveDemo http://livedemo.exadel.com/richfaces-demo/richfaces/outputPanel.jsf?c=outputPanel. But I am not able to understand how we can track the cursor position in a given text.

      Thanks
      Josh