So I am working on a website and in it is a survey with a Yes/No answer portion in the form of checkboxes. I need a way to tally (count) the number of 'Yes' checkboxes checked. Then based on the number go to another page or part of my page. How can I do this?
Below is what I've gotten so far.
<!DOCTYPE html>
<html>
<body>
<font face= "helvetica">
<font color= "white">
<font size= "3">
<form action="demo_form.asp" method="get">
Did/Does a parent or other adult in the household often or very often… Swear at you, insult you, put you down, or humiliate you? or Act in a way that made you afraid that you might be physically hurt? <br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Did/Does a parent or other adult in the household often or very often… Push, grab, slap, or throw something at you? or Ever hit you so hard that you had marks or were injured?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Did/does an adult or person at least 5 years older than you ever… Touch or fondle you or have you touch their body in a sexual way? or Attempt or actually have oral, anal, or vaginal intercourse with you?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Do you often or very often feel that … No one in your family loved you or thought you were important or special? or Your family doesn’t look out for each other, feel close to each other, or support each other?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Do you often or very often feel that … You didn’t have enough to eat, had to wear dirty clothes, and had no one to protect you? or Your parents were too drunk or high to take care of you or take you to the doctor if you needed it?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Are your parents ever separated or divorced?<br>
Is/was your mother or stepmother:
Often or very often pushed, grabbed, slapped, or had something thrown at her? or Sometimes, often, or very often kicked, bitten, hit with a fist, or hit with something hard? or Ever repeatedly hit over at least a few minutes or threatened with a gun or knife?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Do you live with anyone who was a problem drinker or alcoholic, or who used street drugs?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Is/was a household memberdepressed or mentally ill, or has a household member attempted suicide?<br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
Has a household member gone to prison? <br>
<input type="checkbox" name="ace" value="1"> Yes
<input type="checkbox" name="ace" value="0"> No <br>
<input type="submit" value="Submit">
</form>
</font>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire