var currInput; // set so that if the current input is the same when a key is pressed. DONT UPDATE var url = "search.php?param="; // The server-side script var isWorking = false; function handleHttpResponse() { var fpath=new Array(); var imgFandFSplit,imgSplit,imgFolder,imgFile; fpath[1] = 'CASkiTrip'; fpath[2] = '20040529'; fpath[3] = '20040207'; fpath[4] = '20040523'; fpath[5] = '20040308'; fpath[6] = '20041009'; fpath[7] = '20040228'; fpath[8] = '20041021'; fpath[9] = '20040519'; fpath[10] = 'CASkiTrip04'; fpath[11] = 'TwinsBDay'; fpath[12] = '20050206'; fpath[13] = '20050217TheTeam'; fpath[14] = '20041231marksnewyearspics'; fpath[15] = '20050213'; fpath[16] = '20050226chf'; fpath[17] = 'nyc_springbreak'; fpath[18] = '20050611'; if (http.readyState == 4) { if (http.responseText.indexOf('invalid') == -1) { // Split the comma delimited response into an array results = http.responseText.split(" "); imgs = results[0].split(","); var theShow = document.getElementById('show'); theShow.innerHTML = ''; for (var i =0; i"; } } if (theShow.innerHTML.length < 5) theShow.innerHTML = 'No matches'; // document.getElementById('sResults').value = results[1]; var sResults = document.getElementById('sResults'); var spanName; // sResults.innerHTML = results[1]; var resultNames = results[1].split(","); sResults.innerHTML = ''; for (var j = 0;j 0) ) { http.abort(); http.open("GET", url + escape(currName), true); http.onreadystatechange = handleHttpResponse; isWorking = true; http.send(null); //var theShow = document.getElementById('show'); theShow.innerHTML = 'Searching..'; } } if (currName.length == 0) { theShow.innerHTML = 'No matches'; document.getElementById('sResults').value = ''; } } function getHTTPObject() { var xmlhttp; if (navigator.appName == 'Microsoft Internet Explorer') { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { xmlhttp = false; } } else { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } var http = getHTTPObject(); // We create the HTTP Object