<!DOCTYPE html>
<html>
<head>
<title>This is a test</title>
</head>
<body>
<form id="form1">
Size: <input type="number" name="sizes" size="10"><br>
Bow: Yes<input type="radio" name="bow" value=5 />
No <input type="radio" name="bow" value=0 /><br>
Stern: Yes<input type="radio" name="stern" value=5 />
No<input type="radio" name="stern" value=0 />
</form>
<button onclick="outputsize()">Submit</button>
<script>
function outputsize() {
var x,y,b,s,sizes;
x=document.getElementById("form1") ;
y=x.elements["sizes"].value;
b=x.elements["bow"].value;
s=x.elements["stern"].value;
document.getElementById("demo").innerHTML=(y * 2+b+s);
}
</script>
<h1 id="demo"></h1>
</body>
</html>
maybe use something like parseInt ?
https://www.w3schools.com/jsref/jsref_parseint.asp
Thank you. I was wondering how to make the post viewable.
The Number Function did the trick. I was at a lost, but that makes complete sense.. Thank you so much for the helpful advice.
Thank you for your suggestion. Using the Number Function was able to get me the result I was looking for.