I am writing a simple form submission function for a specific site. The script fills out the specific form on the current page and submits the form. He SHOULD also fill out the second form, which appears after sending the first form and submitting this form.
These are two forms that you must fill out and submit.
The problem, however, is that on the regular script page, the 1st form is also populated and submits it. After submitting, however, the script stops working! I want to continue execution!
I did this by mistake on a 2-frame page! most pages have no frames!
function FillFirstForm(){
doc=document;
doc.forms[0].name.value = answerarray[1];
doc.forms[0].address.value = answerarray[2];
doc.forms[0].phone.value = answerarray[3];
doc.forms[0].username.value = answerarray[4];
doc.forms[0].submit.click();
iTimer=setInterval(FillSecondForm,5000);
return true;
}
function FillSecondForm(){
clearInterval(iTimer);
doc.forms[0].tags.value = answerarray[5];
doc.forms[0].reference.value = answerarray[6];
document.forms[0].submit.click();
return true;
}
source
share