i made a signup page where u put infos and it saves in database , im using firebase in this
this is my HTML code for the button :
<!-- Signup Popup -->
<div class="popup" id="signup-popup">
<div class="popup__content">
<h2>Signup</h2>
<form>
<input type="text" placeholder="Username">
<input type="email" placeholder="Email">
<input type="password" placeholder="Password">
<button type="submit" class="button" id="signup">Signup</button>
</form>
</div>
</div>
and this is the firebase :
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
//inputs
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
//submit button
const submit = document.getElementById('signup');
submit.addEventListener("click", function(event){
event.preventDefault()
alert(5)
})
i tried to change the id in const submit = document.getElementById('signup')
to signup-popup