Problem med søgefunktion
Kære eksperter,Jeg får en irriterende "HTTP Error 405 405 Method Not Allowed"-fejl, når jeg tester mit søgescript. Fatter ikke hvor jeg har dummet mig:o(
Er der nogen, der kan gøre mig klogere?
Script:
strKeyword = Trim(Request.Form("searchStr"))
If Len(strKeyword) = 0 Then
Response.Clear
Response.Redirect ("http://www.mitdomæne.dk")
Else
strKeyword = Replace(strKeyword,"'","''")
End If
strKeyword = Trim(Request.Form("searchStr"))
strKeyword = Replace(strKeyword,"'","''")
strSQL = "SELECT ID, ArticleName, Article, Destination FROM Articles WHERE"
strSQL = strSQL & " (ID LIKE '%" & strKeyword & "%')"
strSQL = strSQL & " OR (ArticleName LIKE '%" & strKeyword & "%')"
strSQL = strSQL & " OR (Article LIKE '%" & strKeyword & "%')"
strSQL = strSQL & " OR (Destination LIKE '%" & strKeyword & "%') AND (Lang = '"& Request.QueryString("Lang") & "')"
Set rs = Conn.Execute(strSQL)
If Lang = "da" Then
Response.Write "<h2>Jagtrejser:</h2><br />"& vbCrlf
ElseIf Lang = "en" Then
Response.Write "<h2>Hunting:</h2><br />"& vbCrlf
Else
Response.Write "<h2>Jagt:</h2><br />"& vbCrlf
End If
If Not (rs.BOF or rs.EOF) Then
thisSearch = Replace(rs("ArticleName"), vbcrlf, "<br />")
thisSearch = Replace(thisSearch, "æ", "æ")
thisSearch = Replace(thisSearch, "Æ", "Æ")
thisSearch = Replace(thisSearch, "ø", "ø")
thisSearch = Replace(thisSearch, "Ø", "Ø")
thisSearch = Replace(thisSearch, "å", "å")
thisSearch = Replace(thisSearch, "Å", "Å")
'En masse Replace af danske tegn
thisSearchDest = Replace(rs("ArticleName"), vbcrlf, "<br />")
thisSearchDest = Replace(thisSearchDest, "æ", "æ")
thisSearchDest = Replace(thisSearchDest, "Æ", "Æ")
thisSearchDest = Replace(thisSearchDest, "ø", "ø")
thisSearchDest = Replace(thisSearchDest, "Ø", "Ø")
thisSearchDest = Replace(thisSearchDest, "å", "å")
thisSearchDest = Replace(thisSearchDest, "Å", "Å")
Do While Not rs.EOF
Response.Write "<a href='../articles/?Lang=" & Lang & "&id=" & rs("ID") &"' title='" & thisSearch "'>»" & thisSearch & " (" & thisSearchDest &")</a>"& vbCrlf
rs.MoveNext
Loop
Else
If Lang = "da" Then
Response.Write "<p>Der blev desværre ikke fundet nogen jagttilbud, der passede til din søgning.</p>"
ElseIf Lang = "en" Then
Response.Write "<p>No offers regarding hunting found matching your search.</p>"
Else
Response.Write "<p>Leider wurden zu Ihrer Suchanfrage keine Ergebnisse gefunden.</p>"
End If
rs.Close
Set rs = Nothing
Response.Write "</td></tr></table>" & vbCrlf
Response.Write "</fieldset>"
Conn.Close
Set Conn = Nothing
Kh,
jerving