944,111 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2820
  • VB.NET RSS
Jun 26th, 2006
0

Search Results not displayed in Firefox/Safari

Expand Post »
Hello,
I'm a web designer new to server-side programming who just joined this forum.

I pieced together a custom Index Service search sample using files I got from a Microsoft Studio SDK. The search works great in IE, but the results don't display in Firefox or Safari. I can tell that the search is being passed to the page because with debugg on I see the search parameters. I have no clue why the results don't appear. Can anyone point me in the right direction?

Below I've pasted the portion of the code where I think the problem is. I can show the full code, if needed. I just don't want to paste pages and pages.

Thanks,
Sarah

<code>

<%
if NewQuery then
if UseSessions then
set Session("Query") = nothing
set Session("Recordset") = nothing
end if
NextRecordNumber = 1
set Q = Server.CreateObject("ixsso.Query")
Composer = ""
TheQuery = ""
if SearchString <> "" then
TheQuery = "(@Contents " + SearchString + ")"
Composer = " & "
end if

if Program <> "" then
TheQuery = "(@Program " + Program + ") " + Composer + TheQuery
Composer = " & "
end if
if Region <> "" then
TheQuery = "(@Region " + Region + ") " + Composer + TheQuery
Composer = " & "
end if

if Funder <> "" then
TheQuery = "(@Funder " + Funder + ") " + Composer + TheQuery
Composer = " & "
end if

if Country <> "" then
TheQuery = "(@Country " + Country + ") " + Composer + TheQuery
Composer = " & "
end if

if Topic <> "" then
TheQuery = "(@Topic " + Topic + ") " + Composer + TheQuery
Composer = " & "
end if
if DebugFlag then
Response.Write "TheQuery = " & Server.HTMLEncode( TheQuery ) & "<br />"
end if
set Q = Server.CreateObject ("IXSSO.Query")
Q.Catalog = "irexweb"
Q.DefineColumn "country (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 country"
Q.DefineColumn "funder (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 funder"
Q.DefineColumn "region (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 region"
Q.DefineColumn "program (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 program"
Q.DefineColumn "topic (DBTYPE_WSTR) = d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1 topic"
Q.Query = TheQuery
Q.SortBy = SortBy
Q.Columns = "DocTitle, vpath"
if MaxResults <> -1 then
Q.MaxRecords = MaxResults
end if
set Util = Server.CreateObject("ixsso.Util")
if Scope <> "\" then
Util.AddScopeToQuery Q, Scope, "DEEP"
end if
set RS = Q.CreateRecordSet("nonsequential")
RS.PageSize = RecordsPerPage
ActiveQuery = TRUE
elseif UseSavedQuery then
if IsObject( Session("Query") ) And IsObject( Session("RecordSet") ) then
set Q = Session("Query")
set RS = Session("RecordSet")
ActiveQuery = TRUE
else
Response.Write "ERROR - No saved query"
end if
end if
if ActiveQuery then
if RS.RecordCount <> -1 and NextPageNumber <> -1 then
RS.AbsolutePage = NextPageNumber
NextRecordNumber = RS.AbsolutePosition
end if
if not RS.EOF then
%>

<%
LastRecordOnPage = NextRecordNumber + RS.PageSize - 1
CurrentPage = RS.AbsolutePage
if RS.RecordCount <> -1 AND RS.RecordCount < LastRecordOnPage then
LastRecordOnPage = RS.RecordCount
end if
Response.Write "Programs" & NextRecordNumber & " to " & LastRecordOnPage
if RS.RecordCount <> -1 then
Response.Write " of " & RS.RecordCount
end if
if SearchString <> "" then
Response.Write " matching the query " & chr(34) & "<em>"
Response.Write Server.HTMLEncode( SearchString ) & "</em>" & chr(34) & ".<br /><br />"
end if


if Not RS.EOF and NextRecordNumber <= LastRecordOnPage then
Response.Write "<p><strong>Your search results:</strong></p> <ul>"
end if%>
<% Do While Not RS.EOF and NextRecordNumber <= LastRecordOnPage
' This is the detail portion for Title, Abstract, URL, Size, and
' Modification Date.
' If there is a title, display it, otherwise display the filename.
%>

<%if VarType(RS("DocTitle")) = 1 or RS("DocTitle") = "" then%>
<li><a href="<%=RS("vpath")%>"><%= Server.HTMLEncode( RS("FileName") )%></a></li>
<%else%>
<li><a href="<%=RS("vpath")%>"><%= Server.HTMLEncode(RS("DocTitle"))%></a></li>
<%end if%>
<%
RS.MoveNext
NextRecordNumber = NextRecordNumber+1
Loop
%>
</ul>




</code>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
stricha is offline Offline
1 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Character limit in textbox
Next Thread in VB.NET Forum Timeline: whats wrong in this





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC