Solved

Highlighting keywords in the verity search summary

Posted on 2003-11-06
2
269 Views
Last Modified: 2013-12-24
i was wondering if there is an easy way of highlighting a keyword in the verity search summary.

At the moment i have a simple text box at the top of my page where the user enters their search
criteria.

When they hit the search button it simply searches through a collection of cvs and displays a summary.

All i want to do is highlight the words in the summary that match the users search criteria.

Is there an easy way of doing this??

thanks
0
Comment
Question by:jturkington
2 Comments
 
LVL 2

Accepted Solution

by:
jonnygo55 earned 500 total points
Comment Utility
is the summary in a single variable...and the search is a single word...if so you could do something like

<cfset highlightedKeyword = '<font color="yellow">' & keyword & '</font>'>
<cfset newSummary = replace(oldSummary,keyword,highlightedKeyword,'ALL')>

if it is a more complex search criteria you would have to modify it...
0
 
LVL 10

Expert Comment

by:substand
Comment Utility
let know if you still need help
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now