tom123
03-04-2008, 12:15 PM
Hi
I have a string which may contain multiple occuernces of a search term in it.
I need to highlight each occurence of the search term by spacing a <span> around it.
I currently have:
<cfset formatedEventName = REReplaceNoCase(qSearchDetailsSorted.EventName,(ls_txtString),"<span class=searchHighlight></span>","ALL") />
Where qSearchDetailsSorted.EventName is the string and ls_txtString is the search term.
I dont know what to put inside the opening & closing span to output the actual search term in the string?
Thanks in advance
I have a string which may contain multiple occuernces of a search term in it.
I need to highlight each occurence of the search term by spacing a <span> around it.
I currently have:
<cfset formatedEventName = REReplaceNoCase(qSearchDetailsSorted.EventName,(ls_txtString),"<span class=searchHighlight></span>","ALL") />
Where qSearchDetailsSorted.EventName is the string and ls_txtString is the search term.
I dont know what to put inside the opening & closing span to output the actual search term in the string?
Thanks in advance