Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTrofimov committed Apr 3, 2020
1 parent 1e6195e commit bdabeef
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 31 deletions.
11 changes: 11 additions & 0 deletions js/analys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var resultBtn = document.getElementById('result-button');
resultBtn.addEventListener('click', function () {
var sistol = document.getElementById('sistol-presure').value;
if (sistol <= 100) {
window.location = 'res_low';
} else if (sistol > 100 && sistol < 130) {
window.location = 'res_norm.html'
} else {
window.location = 'res_high.html'
}
});
60 changes: 30 additions & 30 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ email.addEventListener('blur', function (e) {
});


var example = document.getElementById("example");
var ctx = example.getContext("2d");
// var example = document.getElementById("example");
// var ctx = example.getContext("2d");
function object(){
ctx.beginPath();
ctx.moveTo(30,50);
Expand Down Expand Up @@ -151,31 +151,31 @@ function object9(){
ctx.closePath();
ctx.stroke();
}
function animate () {
ctx.fillStyle="#f6f6f6";
ctx.fillRect(0,0,example.width,example.height);
setTimeout(object,50);
setTimeout(object1,150);
setTimeout(object2,200);
setTimeout(object3,250);
setTimeout(object4,300);
setTimeout(object5,350);
setTimeout(object6,400);
setTimeout(object7,450);
setTimeout(object8,500);
setTimeout(object9,550);
}
setInterval (animate,750);


var resultBtn = document.getElementById('result-button');
resultBtn.addEventListener('click', function () {
var sistol = document.getElementById('sistol-presure').value;
if (sistol < 100) {
window.location = 'res_low.html'
} else if (sistol > 100 && sistol < 130) {
window.location = 'res_norm.html'
} else {
window.location = 'res_high.html'
}
});
// function animate () {
// ctx.fillStyle="#f6f6f6";
// ctx.fillRect(0,0,example.width,example.height);
// setTimeout(object,50);
// setTimeout(object1,150);
// setTimeout(object2,200);
// setTimeout(object3,250);
// setTimeout(object4,300);
// setTimeout(object5,350);
// setTimeout(object6,400);
// setTimeout(object7,450);
// setTimeout(object8,500);
// setTimeout(object9,550);
// }
// setInterval (animate,750);

//
// var resultBtn = document.getElementById('result-button');
// resultBtn.addEventListener('click', function () {
// var sistol = document.getElementById('sistol-presure').value;
// if (sistol < 100) {
// window.location = 'res_low';
// } else if (sistol > 100 && sistol < 130) {
// window.location = 'res_norm.html'
// } else {
// window.location = 'res_high.html'
// }
// });
2 changes: 1 addition & 1 deletion templates/analyse.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h2 class="logo">MEDHOUSE</h2>
</div>


<input type="submit" value="Показать рекомендации" class="btn btn-main btn-border-violet mt-4 w-100" id="result-button">
<button class="btn btn-main btn-border-violet mt-4 w-100" id="result-button">Показать рекомендации</button>
</div>
</form>
</div>
Expand Down

0 comments on commit bdabeef

Please sign in to comment.