I have a search results pages and I'd like to highlight the search term to show
the matches. Of course, search is not case sensitive.
On the results I can do something like:
Better written results: #ReplaceNoCase(answer, search_string,"<span
class=""keyword"">" & search_string & "</span>","all")#
This puts a nice little highlight around the search term and makes it easy to
see in the results, but it may change the case. For example, if I search for
"mick jagger" and it finds "Mick Jagger", my answer come out like:
... and a "mick jagger" was guy with big lips who dreamed of being a
Beatle...
Is there a way I could do the replace to highlight the result and NOT change
the case?
Thanks,
Robert
Robert Harrison
Director of Interactive Services
Austin & Williams
Advertising I Branding I Digital I Direct
125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F
631.434.7022 http://www.austin-williams.com
Blog: http://www.austin-williams.com/blog
Twitter: http://www.twitter.com/austin_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351739
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm