Wait, it came up wrong... Sorry!
Here:
<code>-----
<html>
<head>
<title>SulfurMidis - Search</title>
<style type="text/css">
h1 { font: italic bold 25pt "Arial" }
h1 { text-decoration: underline }
h2 { font: italic bold 20pt "Times New Roman" }
h2 { text-decoration: underline }
p.double { border-style: double }
p.margin {margin-left: 2cm}
</style>
<script language="JavaScript" type="text/javascript">
function FindMidi(searchWord)
{
// This tells if it has found any matches or not
var hasFound = false;
// The MIDI database (only contains these 2 for now...)
var Database = new Array();
Database[0] = 'hello.mid';
Database[1] = 'foobar.mid';
// The search words that the user specified
var searchWords = searchWord.split(' ');
// The result page
var Result = '';
// Write some basic stuff to it
Result += '<HTML>\n';
Result += '<HEAD>\n';
Result += '<TITLE>SulfurMidis - Search Results</TITLE>\n';
Result += '</HEAD>\n';
Result += '<BODY>\n';
// For each MIDI in the database,
for (var x = 0; x < Database.lenght; x++)
{
// ERROR HERE // This statement, and I'm assuming the rest of them inside this loop, don't execute
window.alert("Database.lenght: " + Database.length + " | X: " + x)
// For each search term,
for (var y = 0; y < searchWords.lenght; y++)
{
// If the current item is in the database,
if (Database[x].indexOf(searchWords[y]) >= 1 )
{
// Guess the starting letter
var let = '';
// If it starts with a letter,
if (Database[x].substring(1, 1).toLower() == 'a' || Database[x].substring(1, 1).toLower() == 'b' ||
Database[x].substring(1, 1).toLower() == 'c' || Database[x].substring(1, 1).toLower() == 'd' ||
Database[x].substring(1, 1).toLower() == 'e' || Database[x].substring(1, 1).toLower() == 'f' ||
Database[x].substring(1, 1).toLower() == 'g' || Database[x].substring(1, 1).toLower() == 'h' ||
Database[x].substring(1, 1).toLower() == 'i' || Database[x].substring(1, 1).toLower() == 'j' ||
Database[x].substring(1, 1).toLower() == 'k' || Database[x].substring(1, 1).toLower() == 'l' ||
Database[x].substring(1, 1).toLower() == 'm' || Database[x].substring(1, 1).toLower() == 'n' ||
Database[x].substring(1, 1).toLower() == 'o' || Database[x].substring(1, 1).toLower() == 'p' ||
Database[x].substring(1, 1).toLower() == 'q' || Database[x].substring(1, 1).toLower() == 'r' ||
Database[x].substring(1, 1).toLower() == 's' || Database[x].substring(1, 1).toLower() == 't' ||
Database[x].substring(1, 1).toLower() == 'u' || Database[x].substring(1, 1).toLower() == 'w' ||
Database[x].substring(1, 1).toLower() == 'x' || Database[x].substring(1, 1).toLower() == 'y' ||
Database[x].substring(1, 1).toLower() == 'z')
{
// Then just use the letter
let = Database[x].substring(1, 1).toLower() + '/';
}
// Else if it's a humber,
else if (Database[x].substring(1, 1) == '1' || Database[x].substring(1, 1) == '2' || Database[x].substring(1, 1) == '3' || Database[x].substring(1, 1) == '4' || Database[x].substring(1, 1) == '5' || Database[x].substring(1, 1) == '6' || Database[x].substring(1, 1) == '7' || Database[x].substring(1, 1) == '8' || Database[x].substring(1, 1) == '9' || Database[x].substring(1, 1) == '0')
{
// Use "num"
let = 'num/';
}
// Else,
else
{
// Use "sym" (symbol)
let = 'sym/';
}
// Add the let variable as the folder name and Database[x] as the filename
Result += '' + Database[x] + '
\n';
// It has found a match
hasFound = true;
}
}
}
// If it hasn't found any matches,
if (hasFound == false)
{
// Shout out the worst message you could get on a file search :-)
Result += '0 matches were found.';
}
// Write to the document
this.document.open();
this.document.write(Result);
this.document.close();
}
</script>
</head>
<body>
<center>
<form name="SearchForm" action="javascript:FindMidi(document.SearchForm.Phrase.value)">
<input type="text" name="Phrase" size=25>
<input type="submit" value="Search MIDI">
</form>
<hr>
</center>
</body>
</html>
-----</code>
http://www.boredsource.com/sulfurik/
http://tsfc.ath.cx
ftp://tsfc.ath.cx
hotline://tsfc.ath.cxRuffle Mayo says ROFLMAO! :D