<HTML>
<HEAD>
<TITLE>Test Input</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var newArray = [
["apple","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/x/xenia/thumb/fldr_2008_11_28/file0002145868124.jpg>", "<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/h/hotblack/thumb/fldr_2008_11_02/file0001996722767.jpg>", "<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/g/giggs/thumb/fldr_2008_11_15/file0001497068939.jpg>","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/k/kevin_p/thumb/fldr_2009_11_23/file3761259031173.jpg>"],
["book","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/m/mconnors/thumb/fldr_2003_02_01/file0001523081801.jpg>", "<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/m/mconnors/thumb/fldr_2003_01_31/file0001271448953.jpg>", "<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/p/ppdigital/thumb/fldr_2008_11_10/file0001575532855.jpg>","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/x/xandert/thumb/fldr_2004_06_19/file0002083807380.jpg>"],
["man","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/c/chilombiano/thumb/fldr_2008_11_08/file000929969989.jpg","<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/m/mantasmagorical/thumb/fldr_2009_02_20/file5671235165048.jpg"
,"<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/d/duilio/thumb/fldr_2009_12_28/file8041262041572.jpg"
,"<img src=http://s3.amazonaws.com/0.morguefile.com.mirror/imageData/public/files/h/hotblack/thumb/fldr_2008_11_02/file0002062790027.jpg"
]
function testResults (form) {
var TestVar = form.inputbox.value;
var i=0;
for (i=0;i<=100;i++)
{
if (TestVar==newArray[i][0])
{
document.getElementById('img1').innerHTML = newArray[i][1];
document.getElementById('img2').innerHTML = newArray[i][2];
document.getElementById('img3').innerHTML = newArray[i][3];
document.getElementById('img4').innerHTML = newArray[i][4];
}
}
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="myform" ACTION="" METHOD="GET">
<BR>
<table width="100%" border="0">
<tr>
<td width="54%"><h1>Pseudo 'Live' Image Search </h1></td>
<td width="21%"><input type="text" name="inputbox" value="search for"></td>
<td><input type="button" name="button" value="SEARCH THE WEB" onClick="testResults(this.form)"></td>
</tr>
<tr>
<td colspan="2" rowspan="2"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0">
<tr>
<td width="25%"><div id="img1"align="center"><img name="" src="" width="32" height="32" alt=""></div></td>
<td width="25%"><div id="img2"align="center"><img name="" src="" width="32" height="32" alt=""></div></td>
<td width="25%"><div id="img3" align="center"><img name="" src="" width="32" height="32" alt=""></div></td>
<td width="25%"><div id="img4"align="center"><img name="" src="" width="32" height="32" alt=""></div></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" valign="top"><p> As this is only a demo we kept it simple, think alphabet book...dog, cat, boat, car etc. </p>
<p><strong>Don't hand code the array. You will go cross-eyed and crazy, use a desktop web scraper to build it as a text file and paste it in. </strong></p></td>
<td> </td>
</tr>
</table>
<P>
</FORM>
</BODY>
</HTML>