Hopefully this is basic JavaScript and the answer is easy since I am new at this. I just want to make sure all required fields are not blank before the user can proceed. In my <
There are a couple issues here:
cn1 = 'child_name'+document.getElementById('child_name').value;
In this case you are assigning cn1 to the String 'child_name'
+ the value of your child_name textbox... it will never equal an empty String.
Secondly, you'll want your insert()
method to return false
on error in order to stop the button's intended action.