just realized that the subjec said "Top Search"..
oh well.. i thought he wanted "random" queries based on the keyword file so that is why the ssi thingy was there..
Code:
<script language="JavaScript">
<!--
var text = new Array(<!--#exec cgi="random.cgi"--
>)
var i = 0;
function scroll() {
if (text.length > -1) {
if (document.search) {
if (i == text.length) i = 0;
document.search.query.value = text[i++];
}
setTimeout ("scroll()", 3500);
}
}
// -->
</script>
is code that would work better than Ask Jeeves.. hehe.. and it goes forwards.. not backwards..
the main thing about it is that it returns random queries.. the original ssi perl code basically took random lines scattered around the keyword file.. but i realized that if there were only 3 lines and they wanted 5 lines.. the while loop will keep going without stopping because lines 1, 2, and 3 would be all taken. and it doesn't stop unless it gets a number that isn't taken..
so the second ssi perl code basically doesn't do that.. instead.. it does what i beleive Ask Jeeves does.. opens the file and selects a random line.. then starting from that line it starts getting the next X lines after it and if it goes past the total starts at the beginning.. so basically it's stupid in the sense that it will keep LOOPING over and over if you have like 2 queries.. and you select 20 to show up..
jerry