Hello m3g4p0p, thank your for the help!! I have more than one multiple choice sections, that require the same thing,
For example:
<form action="/action_page.php">
<hr style="height:2px;border-width:0;color:blue;background-color:chocolate">
<p style="font-size:20px" for="House Type">What kind of house do you live in?</p>
<input type="radio" id="Detached" name="House Type" value="1.14" onclick="calc(event)" />
<label style="font-size:15px" for="Detached">Detached</label><br>
<input type="radio" id="Semi Detached" name="House Type" value="1.04" onclick="calc(event)" />
<label style="font-size:15px" for="Semi Detached">Semi Detached</label><br>
<input type="radio" id="Terrace" name="House Type" value="0.925" onclick="calc(event)" />
<label style="font-size:15px" for="Terrace">Terrace</label><br>
<input type="radio" id="Flat" name="House Type" value="0.83" onclick="calc(event)" />
<label style="font-size:15px" for="Flat">Flat</label>
<hr style="height:2px;border-width:0;color:blue;background-color:chocolate">
<form action="/action_page.php">
<p style="font-size:20px" for="Age">What is the age of House?</p>
<input type="radio" id="Pre 1945" name="Age" value="1" onclick="calc(event)" />
<label style="font-size:15px" for="Pre 1945">Pre 1945</label><br>
<input type="radio" id="1945-1965" name="Age" value="1" onclick="calc(event)" />
<label style="font-size:15px" for="1945-1965">1945-1965</label><br>
<input type="radio" id="1966-1999" name="Age" value="0.93" onclick="calc(event)" />
<label style="font-size:15px" for="1966-1999">1966-1999</label><br>
<input type="radio" id="2000-2009" name="Age" value="0.81" onclick="calc(event)" />
<label style="font-size:15px" for="2000-2009">2000-2009</label><br>
<input type="radio" id="2010 -" name="Age" value="0.8" onclick="calc(event)" />
<label style="font-size:15px" for="2010 -">2010 -</label><br>
<hr style="height:2px;border-width:0;color:blue;background-color:chocolate">
<form action="/action_page.php">
I am however confused on how `to separate the two in the JavaScript coding. As it keeps thinking both the age and household type are the same, and therefore only gives me one value. Could you help with this issue?