witam,robie aplikacje webowa w ktorej bede mial kalkulator dietetyczny skladajacy sie z bmi,whr i body type czyli to ponizej,jednak cos mi tu nie gra
<!DOCTYPE html>
<html>
<head>
<script language="javaScript">
<!--
function calculateBTyp(){
var height = document.bodyTypeForm.height.value;
var wristSize = document.bodyTypeForm.wristSize.value;
if(height < 157.5&& wristSize<14){
document.bodyTypeForm.meaning.value="small";}
else if(height <157.5&& wristSize>14.6){
document.bodyTypeForm.meaning.value="medium";}
else (height >157.5&& wristSize>14.6){
document.bodyTypeForm.meaning.value="large";}
}}}}
//-->
</script>
</head>
<body>
<form name ="bodyTypeForm">
<p>Your height:
<input class="calcboxx"type="text" name="height" size="10"><br/>
Your wrist size:<span style="margin-left:9px;"><input class="calcboxx"type="text" name="wristSize" size="10"></span><br/>
<input class="calculatee"type="button" value="Calculate Body type" onclick="calculateBTyp()"></p>
<p>Your Body Type:<input class="calcboxx"type="text" name="bodyType" size="10"><br/>
This Means:<input class="calcboxx"type="text" name="meaning" size="25"><br/>
<input class="calculatee"type="reset" value="Reset"/></p>
</form>
</body>
</html>
Staram sie zrobic to:
Women:
- Height under 5'2"
- Small = wrist size less than 5.5"
- Medium = wrist size 5.5" to 5.75"
- Large = wrist size over 5.75"
- Height 5'2" to 5' 5"
- Small = wrist size less than 6"
- Medium = wrist size 6" to 6.25"
- Large = wrist size over 6.25"
- Height over 5' 5"
- Small = wrist size less than 6.25"
- Medium = wrist size 6.25" to 6.5"
- Large = wrist size over 6.5"
Men:
- Height over 5' 5"
- Small = wrist size 5.5" to 6.5"
- Medium = wrist size 6.5" to 7.5"
- Large = wrist size over 7.5"