<form method="post" action="test_1.php" name="test_form">
product quantity
<input type="text" name="product_quantity">
<input type="submit" name="Submit" value="Submit" onClick="javascript: document.location.href='test_2.php'">
</form>
This is a form. And I set up the button as "submit" instead of "none" by mistake. I got strange results from this mistake, it seems both test_1.php and test_2.php are executed. But how exactly they are working is a mystery to me.
So my question is if this "Submit" button is clicked.
1) will test_1.php be executed? because the button is a "submit" button.
2) will test_2.php be executed? because onClick javascript is calling this test_2.php page.
3) will test_1.php work in the current window? and test_2.php work in the background?
4) test_1.php and test_2.php, which one will be executed first? or they will be executed the same time as two differnet threads?
Thanks!