Higlight searched text

Results 1 to 2 of 2

Thread: Higlight searched text

  1. #1
    Join Date
    Dec 1969

    Default Higlight searched text

    Hi Guys,<BR> Im doing a text search engine using index server.<BR>When searched for a text, the results are displayed(each result is a hyperlink) and clicking on the result will lead to the page with information(ex : previews.asp)<BR> In the preview.asp page i want the searched text to be highlighted .... Is there any way of doing it ?? Pls let me know if u need me to post the code or something. Thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Higlight searched text

    Well, this is what I can think of...<BR><BR>Say &#039;strSearchedText&#039; is the variable which contains the searched text in previews.asp<BR><BR>Now where you do a response.write(strInformation), just before that do a strInformation=replace(strInformation, strSearchedText, "&#060;font color=red&#062;" & strSearchedText & "&#060;/font&#062;")<BR><BR>Hope this helps...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts