Right now you search your document and highlight a specific keyword.  Just
put that process in a loop and loop over the keywords:

<cfloop list="#form.keywords#" index="keyword" delimiters=" ">
   <cfset content = replace(content,
      keyword,
      "<span class='highlight'>#keyword</span>",
      "all") />
</cfloop>

HTH,
barneyb

> -----Original Message-----
> From: Tuan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 17, 2003 12:43 PM
> To: CF-Talk
> Subject: highlight MULTIPLE keywords in search results...
>
>
> Can somebody provide me with an example of how to highlight
> multiple keywords in a search result? For example say I wanted to
> search for "macromedia coldfusion, studio" the search results
> will highlight every instance of "macromedia", "coldfusion", and
> "studio" in the document.
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to