dette stk kode virker fint hos mig:
' Henter værdien fra soeg.asp
strKeyword = Trim(Request.Form("Keyword"))
If Len(strKeyword) = 0 Then
' Hvis der ikke er skrevet i feltet
Response.Clear
Response.Redirect("soeg.asp")
Else
' Hvis der er skrevet i feltet
strKeyword = Replace(strKeyword,"'","''")
End If
'response.write strkeyword
'response.end
' Opbygger en dynamisk SQL streng
sqlstr = "SELECT * FROM T_Dok WHERE"
sqlstr = Sqlstr & " (melding LIKE '%" & strkeyword & "%') order by datof asc"
Function Highlight(vFind, vSearch)
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = vFind
RegEx.IgnoreCase = True
Highlight = RegEx.Replace(vSearch, "<span class=""Highlight"">" & vFind &
"</span>")
Set RegEx = Nothing
End Function
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Untitled</title>
<style type="text/css">
.Highlight{background-color:#FFFF00;}
</style>
</head>
<body>