--- trunk/html/js/search.js 2004/07/11 20:18:25 1
+++ trunk/html/js/search.js 2004/07/11 21:15:44 2
@@ -262,6 +262,7 @@
traverseTree,query,result_handler))
{
debug("Unable to locate key "+query);
+ result_handler(new Array());
}
// make sure of garbage collection
xmldoc=null;
@@ -275,6 +276,7 @@
loadData, i, result_handler))
{
debug("ERROR: Unable to locate data "+query);
+ result_handler(new Array());
}
// make sure of garbage collection
xmldoc=null;
@@ -283,10 +285,11 @@
}
}
// Look past the end...
- if(!loadXML(url.replace(".xml","/"+convert(i)+".xml"),
+ if(keys.length == 0 || !loadXML(url.replace(".xml","/"+convert(i)+".xml"),
traverseTree,query,result_handler))
{
debug("Unable to locate key "+query);
+ result_handler(new Array());
}
// make sure of garbage collection
xmldoc=null;