UNKNOWN '************************************** ' Name: Search for and Highlight specifi ' c text in a textarea ' Description:Very simply, search for a ' word and then highlight that word in a t ' extarea (Not using Regular Expression) ' By: A_X_O ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.9794/lngWId.4/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** <html> <head> <title>My HTML</title> </head> <script language="VBScript"> Sub btnHighLight_OnClick() Dim rng Set rng = window.demoMatch.txt01.createTextRange() If rng.findText("shorter")= True Then With rng .select() .scrollIntoView() End With End if Set rng = Nothing End sub </script> <body bgcolor="white"> <form id="demoMatch" name="demoMatch"> <TEXTAREA id="txt01" name="txt01" cols="40" rows="5"> this could be even shorter, if i tried really, very hard. </TEXTAREA> <br> <input type="button" name="btnHighLight" id="btnHighLight" value="Highlight"> </form> <p><font face="Courier">press the button to highlight the word &quot;shorter&quot; in the textarea</font></p> <p><font face="Courier">you can make the highlited word a variable in another textbox in the form.</font></p> </body> </html>