Check if atleast one field is not empty in PHP
is very equal to this question. This is just how to do it in javascript.
When you click on #submit it should check atleast one of these fields:
input[name=weight], input[name=size_1], input[name=size_2], input[name=size_3]
are filled, and not empty. If all of them are empty, it should alert("Please fill one of the fields")
Update: forgot to mention that if the fields are 0 it should not be counted as filled.
How can i do this? I tried copy over from php, but i get stuck on the foreach loop