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 31d1881 commit 4e16c9b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cgi/cgi_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<br/><br/><br/><br/>
<p id="BMI"> </p>
<p id="BMI-result"> </p>
<p id="emailbtn"> </p>
</div>
</div>
HTML
Expand Down Expand Up @@ -83,7 +84,7 @@
alert("Please Fill in everything correctly");
}
}
document.getElementByID("div1").innerHTML += "<button type=\\"button\\" onclick=\\"sendEmail()\\" class=\\"signupbtn\\"> Email results to: $data{email} </button>"
document.getElementByID("emailbtn").innerHTML += "<button type=\\"button\\" onclick=\\"sendEmail()\\" class=\\"signupbtn\\"> Email results to: $data{email} </button>"
function sendEmail() {
Expand All @@ -106,9 +107,9 @@
function(message) {
console.log("Email Status: " + message);
if (message == "OK") {
document.getElementByID("div1").innerHTML += "<br/><br/><br/><br/>Email sent - check your junk folder!";
document.getElementByID("emailbtn").innerHTML += "Email sent - check your junk folder!";
} else {
document.getElementByID("div1").innerHTML += "<br/><br/>" + message;
document.getElementByID("emailbtn").innerHTML += "<br/><br/>" + message;
}
}
);
Expand Down

0 comments on commit 4e16c9b

Please sign in to comment.