From 7792cedd4fefba8ce4cb961db6bdce50001c69a8 Mon Sep 17 00:00:00 2001 From: UbaidRussell Date: Mon, 23 Oct 2023 21:45:17 -0400 Subject: [PATCH] =?UTF-8?q?Wrote=20some=20code=20for=20an=20alert=20pop=20?= =?UTF-8?q?up=20=F0=9F=94=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index e850c74..d75f42b 100644 --- a/main.js +++ b/main.js @@ -13,6 +13,10 @@ let radioChoice; let userAnswer = document.getElementById('user-answer'); +//Part of what we're working on at the bottom of this page 🥊 +let submitButton = document.getElementsByClassName('submit-button'); + + console.log(radioChoices); hideSecondaryContainer(); @@ -24,6 +28,7 @@ form.onsubmit = function(e){ changeNumber(); hideMainContainer(); showSecondaryContainer(); + chooseAOption() } //Change the number in the secondary container @@ -47,4 +52,18 @@ function hideSecondaryContainer(){ //Show the secondary container function showSecondaryContainer(){ secondaryContainer[0].style.display = 'block'; -} \ No newline at end of file +} + + + + + +///This is where we left off RED EMOJI TO MAKE IT STAND OUT 🥊 + +submitButton.onclick = function(){ + if(radioChoices[i].checked === true){ + window.alert('Please choose an option'); + } +} + + \ No newline at end of file