<script>
submitform = function(){
document.getElementById("form1").submit();
setTimeOut(function() {
document.getElementById("form2").submit();
}, 5000);
}
</script>
Karim, I am not sure, whether we can do so or not, as while submitting the first form, it is just redirecting to another URL (class1/add), and where, it is not finding the DOM where form2 present (if we are trying the above code).
So, best if we can use AJAX for submitting the form, and then submit the 2nd form, once we will get success on the first form submit.