Hi I am trying to highlight my search results. I have a replace function, when I highlight the search result the rest of my results changes into upper case. This is what my code looks like:
<%if InStr(ucase(rs("EN"),ucase(search_criteria)) <> 0 then %>
<td><B>{EN}</B></td>
<%
pos=InStr(ucase(rs("EN"),ucase(search_criteria))
chunk=Mid(rs("EN",pos,Len(search_criteria))
MyHighlight=Replace(ucase(rs("EN"), ucase(search_criteria), "<SPAN STYLE=background:#FFFF00>"& chunk &"</SPAN>"
%>
<td><b><%Response.Write (MyHighlight)%></b></td><%
else
if rs("EN" <> empty then
%>
<td><B>{EN}</B></td>
<td><b><%response.write(rs("EN")%></b></td><%
end if
end if%>
can anyone help?
Thanks
Amisima
<%if InStr(ucase(rs("EN"),ucase(search_criteria)) <> 0 then %>
<td><B>{EN}</B></td>
<%
pos=InStr(ucase(rs("EN"),ucase(search_criteria))
chunk=Mid(rs("EN",pos,Len(search_criteria))
MyHighlight=Replace(ucase(rs("EN"), ucase(search_criteria), "<SPAN STYLE=background:#FFFF00>"& chunk &"</SPAN>"
%>
<td><b><%Response.Write (MyHighlight)%></b></td><%
else
if rs("EN" <> empty then
%>
<td><B>{EN}</B></td>
<td><b><%response.write(rs("EN")%></b></td><%
end if
end if%>
can anyone help?
Thanks
Amisima