Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlight keywords from search in webpage

Status
Not open for further replies.

movium

Technical User
Feb 18, 2002
14
SE
Hi,

How do I highlight keywords from verity search in the webpage? I would like to highligt the keywords in cfm-, pdf and htm-files

Regards

Niclas Östlund
 
I am not sure how you can do it in pdf or htm files, but in CF, I ran across this bit of code:

<cfset doc = 'this is a Cold Fusion document. Its is stored in a cold place. the coldness of the place is determined by the temperature. and that temperature is cold!'>

Original document:<br><br>

<cfoutput>#doc#</cfoutput>
<br><br>
<cfset key = 'cold'>

<cfset new_doc = replacenocase(doc, &quot;#key#&quot;, &quot;<b>#key#</b>&quot;,'ALL')>

Changed document:<br><br>

<cfoutput>#new_doc#</cfoutput>

Maybe you could do this on the results page.

HTH,
Tim P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top