Im trying to make a schedule to change who is doing a task every 7 days. But im very new to js and am stuck

Advertisements I’m trying to make a schedule to change who is doing a task every 7 days. I need it to change a html element class and repeat every Friday. Thanks in Advance. var date = new Date(); var dayOfWeek = Date.getDay(); // 0 is Sunday, 1 is Monday, etc… var kestrals = document.getElementById("k"); var… Read More Im trying to make a schedule to change who is doing a task every 7 days. But im very new to js and am stuck

I have two buttons with a click counter each. I want to get the total number of clicks for those two but it's not working

Advertisements I have two buttons with a click counter each. I want to get the total number of clicks for those two but it’s not working. This is my code: <div> <p> Pikachu Total Clicks : <span id="vPika"> 0 </span> </p> <img id="pika" src="https://img.pokemondb.net/sprites/ultra-sun-ultra-moon/normal/pikachu-f.png"/&gt; </div> <div> <p> NineTails Total Clicks : <span id="vNine"> 0 </span>… Read More I have two buttons with a click counter each. I want to get the total number of clicks for those two but it's not working

Javascript help – disable form button until both "input" and "textarea" are filled

Advertisements I have a small script disabling a form button until all inputs in my HTML are filled. I would like to also have "textarea" HTML be filled for the form button to be enabled. In other words, the form button must be enabled if both "input" and "textarea" are filled in, not just "input".… Read More Javascript help – disable form button until both "input" and "textarea" are filled

Submit button not changing text when all fields are validated and clicked

Advertisements Html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> <title>checkbox </title> </head> <body> <form> <div> <label for="name"><span class="stileTesto">Nome</span></label> <input type="text" id="name" name="name" required> </div> <div> <label for="surname"><span class="stileTesto">Cognome:</span></label> <input type="text" id="surname" name="surname" required> </div> <div> <label for="email">Email:</label> <input type="email" id="email" name="email" required> </div> <div> <label for="comment">Scrivi la tua idea!</label> <textarea id="comment" name="comment" required></textarea> </div> <button… Read More Submit button not changing text when all fields are validated and clicked

Center html input file

Advertisements I have a problem with placing an element in the center. This happens either only on top or somehow crooked. I need to place an input file element right in the center #frame_2 { position: absolute; left: 20%; width: 60%; height: 100%; background-color: #f5f8ff; } #frame_files { position: relative; top: 10%; left: 20%; width:… Read More Center html input file

How to get read from multiple inputs with same class name into array

Advertisements I have built a page similar to this snippet. const applyButton = document.querySelector(“.filter-button”); applyButton.addEventListener(“click”, dummyFetchFunction); function dummyFetchFunction(){ //here I want to read the input into an array. //Then I will do the fetch passing this array as parameter. } .filter-button{ margin: 5px; margin-top: auto; border-radius: 5px; } .filter-group{ margin: 10px; font-size: 13px; } .filter-group__title… Read More How to get read from multiple inputs with same class name into array

Want to insert text into a <span>, Error Cannot read properties of undefined (reading 'span')

Advertisements I am a complete and utter beginner making a simple calculator. The HTML file has two text fields (a number is entered in each) and one drop down selector with four options (add, subtract, multiply, divide). A JavaScript file is supposed to, on the press of a button, take the numbers entered into the… Read More Want to insert text into a <span>, Error Cannot read properties of undefined (reading 'span')