Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for javascript error during search (not ready yet)

orbiter656286347ee4
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index 91e9e607c..982a81d8a 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -87,10 +87,10 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
resnav += ("<img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" />&nbsp;");
} else {
resnav += ("<a id=\"prevpage\" href=\"");
- resnav += (QueryParams.navurl("html", thispage - 1, theQuery, null, originalUrlMask, navigation));
+ resnav += (navurlbase + "&amp;startRecord=" + ((thispage - 1) * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
}
- numberofpages = Math.min(10, 1 + ((indexcount - 1) / itemsperpage));
+ numberofpages = Math.min(10, 1 + (((localResourceSize + remoteResourceSize) - 1) / itemsperpage));
for (i = 0; i < numberofpages; i++) {
if (i == thispage) {
@@ -101,7 +101,7 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
resnav += ("\" width=\"16\" height=\"16\" />&nbsp;");
} else {
resnav += ("<a href=\"");
- resnav += (QueryParams.navurl("html", i, theQuery, null, originalUrlMask, navigation));
+ resnav += (navurlbase + "&amp;startRecord=" + (i * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navd");
resnav += (i + 1);
resnav += (".gif\" alt=\"page");
@@ -113,8 +113,8 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
resnav += ("<img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" />");
} else {
resnav += ("<a id=\"nextpage\" href=\"");
- resnav += (QueryParams.navurl("html", thispage + 1, theQuery, null, originalUrlMask, navigation));
+ resnav += (navurlbase + "&amp;startRecord=" + ((thispage + 1) * itemsperpage));
resnav += ("\"><img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" /></a>");
}
document.getElementById("resNav").firstChild.nodeValue = resnav;
-}
\ No newline at end of file
+}