dcsimg
<strong>i want to select particular word in textarea, using javascript i want to replace the selected word </strong>
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   saravanan_ekambaram
Posted On:   Thursday, September 20, 2001 02:27 AM

i want to select particular word in textarea, using javascript i want to replace the selected word by another word.The word which iam trying to select will appear more than one times in that textarea.But i want to replace it exactly in particular place in which where i selected.
Can anybody help

it is urgent plz..

-Sara
India

Re: <strong>i want to select particular word in textarea, using javascript i want to replace the selected word </strong>

Posted By:   Ravi_Verelly  
Posted On:   Thursday, September 20, 2001 01:30 PM

Finally, the solution that works only in IE5. Credit goes to Dave Clark.




replace










Re: <strong>i want to select particular word in textarea, using javascript i want to replace the selected word </strong>

Posted By:   Ravi_Verelly  
Posted On:   Thursday, September 20, 2001 08:19 AM

I think, it is not possible to find the starting position of the selected text in a Text Area. The below code just replaces the first occurrence of the text. We can modify it to replace all the occurrences. This code may not help you, but thought it would be helpful to others.




replace











About | Sitemap | Contact