I have a form and then a JS function which processes it and does 3 actions. Here's my function:
function submit(){
document.optin.action = "link1.php"
document.optin.target = "_self";
document.optin.submit();
window.open('http://link2.html','','scrollbars=yes,height=600,width=900,resizable=yes');
document.optin.action = "link3.php"
document.optin.target = "_self";
document.optin.submit();
}
The 2nd and 3rd actions work but the first does not. Actions 1 and 3 open on the same window with the latter overrides the former. Any idea what's wrong with my code? pls...