Closed HarshKapadia2 closed 3 years ago
@HarshKapadia2 I will do this task.
Go ahead @Haroonchik. Please take note of the suggestions on PRs and commit messages that I gave you in PR #15.
@HarshKapadia2 Check, please https://github.com/HarshKapadia2/one-or-two/pull/17
PR #17 merged!
Hey @Haroonchik, I am hosting a Hacktoberfest and Open Source session tomorrow. If you're interested, registration and further details are available here: https://bit.ly/otcHacktoberfest1
On the home page (
./templates/home-page.html
), once thePredict
button is clicked, it should be disabled so that multiple requests are not sent to the server.Use client side JavaScript (JS) to handle this.
Steps:
id
to thePredict
button in./templates/home-page.html
../static/js
.{% block head %}
section of./templates/home-page.html
(example) after adding{% block head %}{% endblock %}
to./templates/base.html
(example).Predict
button usingconst <element> = document.querySelector("#<element-id>")
.click
event to the button.<element>.disabled = true
to disable the button.