Land Measuring Converter
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Land Measuring Converter</title>
<script>
function cal(){
var from=document.f.cmbFromUnit.value;
var to=document.f.cmbToUnit.value;
var amount=parseFloat(document.f.txtAmount.value);
var output=0.0;
if(from=="gonda" && to=="katha"){
output=(amount*1.21)+" "+to;
}else if(from=="katha" && to=="gonda"){
output=(amount*(1/1.21))+" "+to;
} else if(from=="katha" && to=="sqrtf"){
output=(amount*720)+" "+to;
} else if(from=="sqrtf" && to=="katha"){
output=(amount*(1/720))+" "+to;
} else if(from=="sqrtf" && to=="gonda"){
output=(amount*(1/871.2))+" "+to;
}else if(from=="gonda" && to=="sqrtf"){
output=(amount*871.2)+" "+to;
}
document.getElementById("output").innerHTML="= "+output;
}
</script>
</head>
<body>
<form style="width:350px;" name="f">
<fieldset>
<legend>LMC</legend>
Amount<br/>
<input type="text" name="txtAmount" id="txtAmount" onKeyUp="cal()" />
<select name="cmbFromUnit" onChange="cal()">
<option value="gonda">Gonda</option>
<option value="katha">Katha</option>
<option value="sqrtf">Square ft</option>
</select>
to
<select name="cmbToUnit" onChange="cal()">
<option value="katha">Katha</option>
<option value="gonda">Gonda</option>
<option value="sqrtf">Square ft</option>
</select>
<br/>
<span id="output" style="font-size:20px;"></span>
</fieldset>
</form>
</body>
</html>
Reference:
Calculation of area of land in Bangladesh
Comments 0