I found out what the problem was:
Among the misc. code that was copied from the supplied contactus.php form into my new form, this code was the problem:
<form action="" method="post" name="emailContact" id="form1" onsubmit="">
I removed the onsubmit="" and it works as expected.