Click to See Complete Forum and Search --> : Intoducing delay in submitting two forms


mili
09-14-2003, 01:52 PM
Hi,

I want to submit two forms one after the other. I also want two insert a delay after submitting the first form (for a few seconds) and then submit the second form.How can I do this?
Here is my script:

if(document.reimport.id_load_status.value.indexOf("FA;") != -1)
{

document.reimport.submit();
//alert("Submitted Re-import");

parent.document.search.submit();
//alert("Submitted Filter");

}
else
{
alert("Only Files with Status FA can be re-imported" );
return;
}

David Harrison
09-14-2003, 04:24 PM
Hows this:

function form2(){
parent.document.search.submit();
//alert("Submitted Filter");
}

if(document.reimport.id_load_status.value.indexOf("FA;") != -1)
{

document.reimport.submit();
//alert("Submitted Re-import");

setTimeOut("form2()", 1000); // Number is delay in milliseconds.

}
else
{
alert("Only Files with Status FA can be re-imported" );
return;
}

mili
09-14-2003, 05:14 PM
Thanks! I will try this

David Harrison
09-14-2003, 05:19 PM
I hope it works for you.

mili
09-14-2003, 05:49 PM
I got object expected error.

Is it setTimeout instead of setTimeOut?

David Harrison
09-14-2003, 06:14 PM
Sorry, yes it is setTimeout, I sometimes hit the shift button again because it is a new word.