| | |
Search Results not displayed in Firefox/Safari
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2006
Posts: 1
Reputation:
Solved Threads: 0
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>
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
- IE Search results being hijacked (Viruses, Spyware and other Nasties)
- Navigate back to Search Results (ColdFusion)
- How to hyperlink mysql search results? (MySQL)
- Search Results Not Found (PHP)
- Desktop backgroud has been taken over, google search results being hijacked and more! (Viruses, Spyware and other Nasties)
- Search Results for poker online (Viruses, Spyware and other Nasties)
- Folders open Search Results (Windows NT / 2000 / XP)
- See your Website in Google search results in 24h (Post your Resume)
Other Threads in the VB.NET Forum
- Previous Thread: Character limit in textbox
- Next Thread: view and edit data from database
| Thread Tools | Search this Thread |
.net .net2008 2008 access account add advanced application array basic beginner browser button buttons click code combo cpu cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic employees excel exists fade filter forms generatetags html images input intel internet listview mobile module monitor mysql net number objects open panel pdf picturebox picturebox2 port position print printing printpreview problem regex reuse right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver storedprocedure survey temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet vista visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





