function valform()
{
 var name = document.getElementById("username").value;
 var h2 = document.getElementById("height1").value;
 var w2 = document.getElementById("weight1").value;
 var r2 = document.getElementById("txtresult").value;
 
 if( name == ""  || h2 == "" || w2 == "" || r2 == "" )
 {
  alert("Please fill in the blank(s) first");
  return false;
 }
 if(!($('input[type=radio]:checked').size() == 12))
 {
  alert("You must answer all the questions");
  return false;
 }
}
So, basically the code above cannot run in 000webhost.com but can run with XAMPP server. If I click submit when all the radio buttons do not checked, it supposed to show the alert but it just go to another page. I checked all the syntax are correct and still not working. So I wonder why? The link: https://cancertool123.000webhostapp.com/Questionnaire%20(Colon%20Cancer).php
Some explanations will be helpful.