Hiya, Tommy,
Thanks for the suggestion. I couldn't get it to work, though. It's probably me... I'm very flat-footed with the code.
Here is what I tried:
if(parseCriteria(asearch)){
entries.FTSearch(asearch, maxreturn);
resultNum = entries.getCount();
var removeCount = entries.getCount() - 500;
sessionScope.resultDesc = "Alliance Search Results: "+resultNum+" results found.";
sessionScope.searchString = asearch;
if (resultNum > 0) {
viewScope.unidCollection = getUnidCollection(entries);
if (resultNum >= topResults){
viewScope.tooManyResults = true;
/*
viewScope.ResultDisplay = '<font color="red">*Your search has yielded ' +resultNum +' results.*</font><br><br>' +
'We have listed the most recent 500 results for this search. If you wish to view other records for this search, '+
'please go ' +
'<a href="AllianceSearchBuilder.xsp"><font color="blue">BACK</a></font> ' +
'and revise the search for a more accurate result set.<br><br><br>';
*/
}
if (resultNum < topResults) {
viewScope.ResultDisplay = resultNum+" results<br>";
}
// Trim the collection to 500 documents
for( var i = 0; i <= removeCount; i++ ){
entries.subtract( entries.getLastDocument().getNodeID() );
}
return getArray(entries);
}else{
viewScope.ResultDisplay = '<!-- SEARCH RESULTS TOP INFO DISPLAY --><table width="100%" cellpadding="10" cellspacing="0"><tr><td>' +
'<font size="2">No Result Found from your Search Criteria.</font></td></tr></table><!-- END SEARCH RESULTS -->';
}
}else{
viewScope.ResultDisplay = '<!-- SEARCH RESULTS TOP INFO DISPLAY --><table width="100%" cellpadding="10" cellspacing="0"><tr><td>' +
'<font size="2">There was ERROR with Search Criteria.</font></td></tr></table><!-- END SEARCH RESULTS -->'+asearch;
}