database for each search. The arrayflg is used to flag that it has been done. */ arrayflg=1; /* First, read in the string from the hidden form element. */ ls=document.ug.ly.value; ctr=0; /* Then parse the long string and load it into the array. */ while (ls.indexOf("*")>-1){ pos=ls.indexOf("*"); db[ctr]=ls.substring(0,pos); /* Similarly, no need to repeatedly convert the strings in the array to lower case. Once is enough. */ dblc[ctr]=db[ctr].toLowerCase(); ls=ls.substring(pos+1,ls.length); ctr++; } } so many comments. What does it do? This code has /* This separate function simply saves parsing the database for each search. The arrayflg is used to flag that it has been done. */ /* First, read in the string from the hidden form element. */ /* Then parse the long string and load it into the array. */ /* Similarly, no need to repeatedly convert the strings in the array to lower case. Once is enough. */ function loadIt(){ arrayflg=1; ls=document.ug.ly.value; ctr=0; while (ls.indexOf("*")>-1){ pos=ls.indexOf("*"); db[ctr]=ls.substring(0,pos); dblc[ctr]=db[ctr].toLowerCase(); ls=ls.substring(pos+1,ls.length); ctr++; } }
2011 @searls seefl[email protected] @seeflanigan Thanks to Brandon Keepers (@bkeepers) for the Keynote template! find this talk at http://is.gd/rockyjasmine