you need some way of queueing the calls to search() so the next doesn't get called until the previous finishes.
one way would be to make submitparams() recursive. try this - notice i've given your checkboxes a value representing the filename, and i'm passing all checkbox values as one array. make sure your search() function returns true so submitparams() will wait for it:
function submitparams(input, arParams) {
if (!arParams || !arParams.length || arParams.length == 0) return true;
else {
if (arParams[0].length == 0) {
arParams = arParams.shift();
submitparams(input, arParams);
}
else if (search(arParams[0] + ".htm", input)) {
arParams = arParams.shift();
submitparams(input, arParams);
}
}
}
<FORM name = "drawing_finder"
onSubmit="submitparams(this.subject.value,
[this.ESO.value,
this.CS2.value,
this.CSSC.value,
this.GWC.value,
this.HF.value,
this.MICC.value,
this.NWT.value,
this.OIS.value,
this.PCS.value,
this.PIC.value,
this.PRS.value,
this.SCS.value,
this.ALL.value])";>
<B>SUBJECT: </B> <INPUT TYPE = "text" NAME = "subject" SIZE = "40"> <INPUT TYPE = "submit" value = "Search">
<BR><BR>
<TABLE>
<TR>
<TD>
<B>SEARCH ONLY:</B>
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "CS2" value="cs2" onClick="turnallboxoff();"> CS2
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "CSSC" value="cssc" onClick="turnallboxoff();"> CSSC
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "ESO" value="eso" onClick="turnallboxoff();"> ESO
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "GWC" value="gwc" onClick="turnallboxoff();"> GWC
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "HF" value="hf" onClick="turnallboxoff();"> HF
</TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "MICC" value="micc" onClick="turnallboxoff();"> MICC
</TD>
</TR>
<TR>
<TD></TD>
<TD>
<INPUT TYPE = "checkbox" NAME = "ALL" value="all" onClick="checkall();"> ALL
</TD>
</TR>
...
</TABLE>
</FORM>
=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff