He is using early returns so it never gets to the end.
If the javascript is knackered the form submits by default. Install firebug, turn javascript errors on. Wrap in a try catch
http://www.w3schools.com/js/js_try_catch.asp
Try catch won't stop syntax errors like these but it will stop referencing anything that does not exist etc from breaking it. The database should also be guarded by the php, javascript is just a convenience method for the user to stop round trips.
You are also parsing a reference to the form with the onsubmit=checkit( this ) then hard calling it on the inside. Notice the example does not use the document keyword.
Yours
if (document.addsubscriber.company.value =='')
&& ((document.addsubscriber.firstname.value =='')
|| (document.addsubscriber.lastname.value ==''))
{
alert('Please provide a company and/or a first and last name.');
document.addsubscriber.firstname.focus();
return false;
}
Theirs
if (addsubscriber.firstname.value =='') {
alert('Please provide a first name');
addsubscriber.firstname.focus();
return false;
}
Though your immediate problem is your brackets are out of sync.
You have to wrap the whole clause
eg
if (document.addsubscriber.company.value =='')
&& ((document.addsubscriber.firstname.value =='') || (document.addsubscriber.lastname.value ==''))
should be
if ((document.addsubscriber.company.value =='')
&& ((document.addsubscriber.firstname.value =='') || (document.addsubscriber.lastname.value =='')) )
There are a few like that. Firebug in firefox shows you them all.