This process is basically a "Confirm" notice to the user. To make sure the user is responsible for the data being passed. Its a way to put the ownership on the user to verify the data again before submitting.
HTML Form Code:
<form action="nextpage.html" method="post" target="_top" name="submitform" onSubmit="return confirmAction()"> <input type="submit" value="Checkout" name="sub"> </form>