unsavory
07-06-2004, 07:10 PM
Can someone help me out with this please?
I have a form with a textarea, and a textfield.
I want the user to be able to highlight a substring of the text they have pasted into the textarea, and replace it with text they have entered into the textfield.
I'm sorry, but I am a JavaScript newbie so I can't figure this one out. It's for a JSP app I am trying to make.
Thanks!
PS: I should add that the text needs to be replaced using position, and not regex because the text may appear in more than one place within the same textarea.
I have a form with a textarea, and a textfield.
I want the user to be able to highlight a substring of the text they have pasted into the textarea, and replace it with text they have entered into the textfield.
I'm sorry, but I am a JavaScript newbie so I can't figure this one out. It's for a JSP app I am trying to make.
Thanks!
PS: I should add that the text needs to be replaced using position, and not regex because the text may appear in more than one place within the same textarea.