#The <div> dont get the class

32 messages · Page 1 of 1 (latest)

cloud storm
#

add more console.log to fix your issues

brisk salmon
#

what shall i write? i'm learning javascript, sorry

#

and what shall i write?

cloud storm
#

Did you write this code yourself

brisk salmon
#

yes with some online website helps

cloud storm
#

errors is shadowed inside of the if condition
if (username_input) is always truthy
where do the username, password, repeat, etc. come from?
why not just add the incorrect class if (errors.length > 0)

brisk salmon
#
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hungarian E-sport Leagues</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div id="form" class="register-box">
    <div class="wrapper">
        <form class="register-form">
            <div><h1>S</h1><h1>i</h1><h1>g</h1><h1>n</h1><h1>u</h1><h1>p</h1></div>
            <div>
                <label for="username-input"><svg></svg></label>
                <input required type="text" name="username" id="username-input" placeholder="Username">
            </div>
            <div>
                <label for="email-input"><svg></svg></label>
                <input required type="email" name="email" id="email-input" placeholder="Email">
            </div>
            <div>
                <label for="password-input"><svg></label>
                <input required type="password" name="password" id="password-input" placeholder="Password">
            </div>
            <div>
                <label for="re-password-input"><svg ></svg></label>
                <input required type="password" name="re-password" id="re-password-input" placeholder="Repeat Password">
            </div>
            <div class="button"><button type="submit">Signup</button></div>
            <p>Already have an Account? <a href="login.html">login</a></p>
        </form>
        <video autoplay loop muted playsinline class="background"><source src="background.mp4" type="video/mp4"></video>
    </div>
</div>
<script src="scripts.js"></script>
</body>
</html>```
cloud storm
#

just paste it into chat gippity 😩

brisk salmon
#

i tried it and that shi' wont help :c

#

i tried 1231312321 different code

#

2141231 different html

#

nothing

cloud storm
#

😂

#

Any reason why you're using raw JS?

brisk salmon
#

i tought this is the only way to do it lol

cloud storm
#

basically no one does pure JS these days

brisk salmon
#

what do u mean pure js?

cloud storm
#

Just writing JavaScript code without any framework or library

#

e.g. React, Vue, Angular

(or even just JQuery as the bare minimum)

brisk salmon
#

idk, i have done it once, but i deleted it and cant find it

cloud storm
brisk salmon
#

ty

#

im trying to learn it by my self btw, prolly thats why i didnt know anything about it

cloud storm
#

all good 🫶

#

The Odin Project is more or less the best resource for learning web dev stuff I've seen so far, way better than basically every paid course I've seen

brisk salmon
#

ty

brisk salmon
#

i'm so dumb

#

holy shit

brisk salmon
#

i've done it

#

holy

cloud storm
#

😎