Skip to content

Commit

Permalink
Update cgi_test.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
arfhad-shaikh committed Jul 29, 2021
1 parent 08375cf commit e6c61ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cgi/cgi_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<input type="number" id="weight" name="weight" placeholder="Your weight in kg..">
<button type="submit" class="signupbtn" onclick="calculateBMI()">Calculate BMI</button>
<br/><br/>
<br/><br/><br/><br/>
<p id="BMI"> </p>
<p id="BMI-result"> </p>
</div>
Expand All @@ -65,7 +65,7 @@
var result = "";
if(weight > 0 && height > 0){
var BMI = Math.round(weight/(height/100*height/100));
document.getElementById("BMI").innerHTML = "Your BMI is" + BMI;
document.getElementById("BMI").innerHTML = "Your BMI is " + BMI;
if(BMI < 18.5){
document.getElementById("BMI-result").innerHTML= "You are too thin.";
result="That you are too thin.";
Expand Down Expand Up @@ -106,9 +106,9 @@
function(message) {
console.log("Email Status: " + message);
if (message == "OK") {
document.body.innerHTML += "<br>Email sent - check your junk folder!";
document.body.innerHTML += "<br/><br/>Email sent - check your junk folder!";
} else {
document.body.innerHTML += "<br>" + message;
document.body.innerHTML += "<br/><br/>" + message;
}
}
);
Expand Down

0 comments on commit e6c61ad

Please sign in to comment.