not sure if anyone can help me, but I would reall apriciate it if you could. I downloaded this custom tag from and it is not very long code. It seems to work fine except that it will only highlight the last word in the document, and not all instances of the word.
This is the code for the custom tag:
<cfparam name="attributes.words" default="test,is">
<cfparam name="attributes.delimeter" default=",">
<cfparam name="attributes.prefix" default="<b>">
<cfparam name="attributes.suffix" default="</b>">
<cfscript>
for (i=1;i LTE ListLen(attributes.words, attributes.delimeter);i=i+1) {
if (thistag.ExecutionMode IS "End") {
thisTag.GeneratedContent = ReReplaceNoCase(thisTag.GeneratedContent, "(.*)(#ListGetAt(attributes.words, i, attributes.delimeter)#)(.*)", "\1#attributes.prefix#\2#attributes.suffix#\3", "ALL");
}
}
</cfscript>
and this is the code on the page that has the tag on it:
<cfoutput>
<cfparam name="url.search" default="">
<cfset keywords = "#url.search#">
<cf_highlight words = "#keywords#">
<div class="heading">#get_text.heading#</div><BR>
#get_text.textarea#</cf_highlight></cfoutput>
This is the code for the custom tag:
<cfparam name="attributes.words" default="test,is">
<cfparam name="attributes.delimeter" default=",">
<cfparam name="attributes.prefix" default="<b>">
<cfparam name="attributes.suffix" default="</b>">
<cfscript>
for (i=1;i LTE ListLen(attributes.words, attributes.delimeter);i=i+1) {
if (thistag.ExecutionMode IS "End") {
thisTag.GeneratedContent = ReReplaceNoCase(thisTag.GeneratedContent, "(.*)(#ListGetAt(attributes.words, i, attributes.delimeter)#)(.*)", "\1#attributes.prefix#\2#attributes.suffix#\3", "ALL");
}
}
</cfscript>
and this is the code on the page that has the tag on it:
<cfoutput>
<cfparam name="url.search" default="">
<cfset keywords = "#url.search#">
<cf_highlight words = "#keywords#">
<div class="heading">#get_text.heading#</div><BR>
#get_text.textarea#</cf_highlight></cfoutput>