MVC js function value returned in view how to pass to controller?

My mvc knowledge is poor, apologies from the off.

I’ve been given some 3rd party examples of dialog re-usage and I’m wanting to look at using some elements to pull values end users have selected, examples given have a js function handling the selected value, how would I pass this to the controller action below? Any help or pointers would be massively appreciated.

View js function


        function fileSelected(data) {
            var el = document.getElementById("fileId");
            if (data)
                   el.innerText = data.selected;
            else
        el.innerText = "None";
}

Controller action I’d like it to land

        [HttpPost]
        public ActionResult fd(string Fid)
        {
            Debug.WriteLine(Fid);
            return View();
        }

my chatroom is full of strange positions bugs and text bugs

i was writing a website called NeoChatroom when suddently the button i made to creat a new room started glitching like crazy, changing positions, the buttons started vanishing at some point, it was chaos.

i tried changing positions on px but it just made the problem worser, then i tried asking to github copilot what the hell what was happening but he just kept giving me the same code. i tried switching variables to see if the room name would finnally show up like t should since the start, but it kept showing “Name:…” then the actual name.
please analyze my code and tell me whats wrong.

(HTML) index.html:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Neo Chatroom</title> <style> @import url('https://fonts.googleapis.com/css?family=Varela+Round');

    body {
        margin: 1px;
        font-family: 'Varela Round', sans-serif;
        transition: background-color 0.3s, color 0.3s;
    }

    p, h1, h2, h3, li, button {
        font-family: 'Varela Round', sans-serif;
    }

    button {
        font-weight: 800;
        font-size: larger;
        padding: 12px 24px;
        border-radius: 8px;
        cursor: pointer;
        background-color: #333;
        color: white;
    }

    section {
        background-color: rgb(85, 96, 97);
    }

    input, select {
        max-width: 100%;
        box-sizing: border-box;
    }

    .room-info {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-grow: 1;
    }

    .room-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        margin: 10px 0;
        background-color: #f0f0f0;
        border-radius: 8px;
        position: relative;
    }

    .delete-button, .join-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .delete-button {
        right: 80px; 
    }

    .join-button {
        right: 45px; 
    }
    /* epik themes */
    body.DarkPlus {
        background-color: #1a1a1a;
        color: white;
    }
    
    body.modernDark {
        background-color: #2c2c2c;
        color: white;
    }
    
    body.redVibes {
        background-color: #880000;
        color: white;
    }
    
    body.ZeroFarenheit {
        background-color: #00f;
        color: white;
    }
    
    body.contrastLight {
        background-color: #f0f0f0;
        color: black;
    }
    
    body.abyssDark {
        background-color: #121212;
        color: white;
    }
    
    body.matrix {
        background-color: #0f0;
        color: black;
    }
    
    body.solarizedDark {
        background-color: #002b36;
        color: #839496;
    }
    
    body.tomorrowNightBlue {
        background-color: #1a1a2e;
        color: #a0a0a0;
    }
    
    body.aesthetic {
        background-color: #f7d2f7;
        color: #5a2d5a;
    }
</style>

</head> <body> <label for="ThemeDropDown">select ur epik theme: </label> <select id="ThemeDropDown" name="themes"> <option value="DarkPlus">DarkPlus</option> <option value="modernDark">Modern Dark</option> <option value="redVibes">Red Vibes</option> <option value="ZeroFarenheit">ZeroFarenheit</option> <option value="contrastLight">Contrast Light</option> <option value="abyssDark">Abyss Dark</option> <option value="matrix">Matrix</option> <option value="solarizedDark">Solarized Dark</option> <option value="tomorrowNightBlue">Tomorrow Night Blue</option> <option value="aesthetic">Aesthetic</option> </select> <h1>Neo Chatroom</h1> <h2>Welcome to the Neo Chatroom, here you can:<ul> <li>chat and socialize</li> <li>host chatrooms</li> <li>meet new people</li> <li>join chatrooms</li> </ul> </h2> <h3><small>NeoChatroom, since 2025 : )</small></h3> <label for="roomName">Room Name: </label> <input type="text" id="roomName" name="roomName"> <label for="privacy">Privacy: </label> <select id="privacy" name="privacy"> <option value="public">Public</option> <option value="semi-private">Semi-Private</option> <option value="private">Private</option> </select> <label for="userCap">User Cap: </label> <input type="number" id="userCap" name="userCap" min="1" max="100"> <button id="newroom" onclick="newroom()">New Room</button> <section id="roomssection"> <p><strong>Available Rooms: </strong></p> </section> <script src="webscript.js"></script> <script> const ThemeDropDown = document.getElementById('ThemeDropDown');

    function changeTheme() {
        const selectedTheme = ThemeDropDown.value;
        document.body.className = selectedTheme;
    }

    ThemeDropDown.addEventListener('change', changeTheme);

    document.addEventListener('DOMContentLoaded', () => {
        const defaultTheme = 'DarkPlus';
        document.body.classList.add(defaultTheme);
        ThemeDropDown.value = defaultTheme;
    });
</script>

</body> </html>

(JavaScript) webscript.js:

let hasCreatedRoom = false;

const ws = new WebSocket('ws://localhost:8080');

ws.onmessage = function(event) { const data = JSON.parse(event.data); createRoomElement(data, false); };

function newroom() { if (hasCreatedRoom) { alert("You can only create one room."); return; }

const roomName = document.getElementById("roomName").value;
if (!roomName) {
    alert("Room name cannot be empty.");
    return;
}

const privacy = document.getElementById("privacy").value;
const userCap = document.getElementById("userCap").value;
let roomCode = "";

if (privacy === "semi-private") {
    roomCode = generateRoomCode();
}

const roomData = {
    width: "100px",
    height: "100px",
    backgroundColor: "rgb(247, 223, 223)",
    margin: "10px",
    borderRadius: "10px",
    name: roomName,
    privacy: privacy,
    code: roomCode,
    userCap: userCap,
    owner: true
};

ws.send(JSON.stringify(roomData));
createRoomElement(roomData, true);
hasCreatedRoom = true;

}

function createRoomElement(data, isOwner) { var newDiv = document.createElement("div"); newDiv.className = "room-container"; newDiv.style.width = data.width; newDiv.style.height = data.height; newDiv.style.backgroundColor = data.backgroundColor; newDiv.style.margin = data.margin; newDiv.style.borderRadius = data.borderRadius;

var roomInfo = document.createElement("p");
roomInfo.className = "room-info";
roomInfo.textContent = `Name: ${data.name}, Privacy: ${data.privacy}, User Cap: ${data.userCap}`;
if (data.privacy === "semi-private" && isOwner) {
    roomInfo.textContent += `, Code: ${data.code}`;
}

newDiv.appendChild(roomInfo);

if (isOwner) {
    var deleteButton = document.createElement("button");
    deleteButton.className = "delete-button";
    deleteButton.textContent = "Delete Room";
    deleteButton.onclick = function() {
        newDiv.remove();
        hasCreatedRoom = false;
    };
    newDiv.appendChild(deleteButton);
}

var joinButton = document.createElement("button");
joinButton.className = "join-button";
joinButton.textContent = "Join Chatroom";
joinButton.onclick = function() {
    alert(`Joining room: ${data.name}`);
};
newDiv.appendChild(joinButton);

var roomsSection = document.getElementById("roomssection");
roomsSection.appendChild(newDiv);

}

function generateRoomCode() { const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; let result = ''; for (let i = 0; i < 5; i++) { result += characters.charAt(Math.floor(Math.random() * characters.length)); } return result; }

here is s a image of the bug: the transparent thing is the join chatroom button.

please tell me what must be wrong.

why is it that #text HTMLElement reference to parent Node sometimes return null

I am getting focused element target with selection API this way below

const target = window.getSelection()?.focusNode;

And when the focusNode is #text HTMLElement, I would want to get the #text Node parent node by doing the following below

console.log((target as HTMLElement));
console.log((target as HTMLElement).parentNode as HTMLElement);
((target as HTMLElement).parentNode as HTMLElement)?.append(
  rows
);
((target as HTMLElement).parentNode as HTMLElement)?.append(
  '<click here to continue new line>'
);
(((target as HTMLElement).parentNode as HTMLElement)?.childNodes[
  ((target as HTMLElement).parentNode as HTMLElement)?.childNodes.length - 1
] as HTMLElement).innerHTML = '<click here to continue new line>';

This works all the time on chrome, but work on mozilla and fails sometimes along the line where I want to get the parent Node.

((target as HTMLElement).parentNode as HTMLElement) returns null 

I have tried to run them in a setInterval function below but it still not working.

let counter = 0;
const tt = setInterval(() => {
  const 
    t1 = (target as HTMLElement),
    t2 = ((target as HTMLElement).parentNode as HTMLElement)
  ;
  if(t1 !== null && t2 !== null) {
    ((target as HTMLElement).parentNode as HTMLElement)?.append(
      rows
    );
    ((target as HTMLElement).parentNode as HTMLElement)?.append(
      '<click here to continue new line>'
    );
    (((target as HTMLElement).parentNode as HTMLElement)?.childNodes[
      ((target as HTMLElement).parentNode as HTMLElement)?.childNodes.length - 1
    ] as HTMLElement).innerHTML = '<click here to continue new line>';
    clearInterval(tt);
  }
  else {
    if(counter > 30) {
      clearInterval(tt);
    }
  }
  counter++;
}, 1);

Please I need help on how to solve this problem in such a way that as long as the #text HTMLElement is not null or undefined then its parent node should never ever be null or undefined.

ReactJS: Hide Footer on certain routes or during specific actions like search [closed]

I want to hide the Footer component when the Body (Home page) is displayed and a search is performed. However, the Footer should remain visible on other pages like About or Contact.

I tried using a state variable (isSearching) in Body.js and passing it to the Footer component, but it doesn’t work as expected. Instead, the Footer is either always visible or hidden.

How can I hide the Footer during a search in Body.js and also conditionally hide it on specific pages?

Here’s my relevant code:

> Body.js

const Body = () => {
  const [isSearching, setIsSearching] = useState(false);
  
  const handleSearch = () => {
    setIsSearching(true);
  };

  return (
    <div>
      <button onClick={handleSearch}>Search</button>
      <Footer isSearching={isSearching} />
    </div>
  );
};

> Footer.js

const Footer = ({ isSearching }) => {
  if (isSearching) return null;
  return <footer>Footer Content</footer>;
};

> app.js

  const AppLayout = () => (
  <div>
    <Header />
    <Outlet />
    <Footer />
  </div>
);

Is there a better way to conditionally hide the footer on specific components/pages in React Router? Please help!

CORS Error when using .page.js, but not .page.server.js to fetch external csv ressource with SvelteKit

There are many similar question, but none really made me understand this very basic problem in plain english.

I am trying to fetch the data from this csv file in my SvelteKit-Application.

I first tried to load it in a load-function in the +page.js file like this:

//+page.js
import Papa from 'papaparse';
export async function load({ fetch }) {
    const res = await fetch(
        'https://sites.ecmwf.int/data/climatepulse/data/series/era5_daily_series_2t_global.csv'
    ).then((r) => r.text());
    const { data } = Papa.parse(res, { header: true });
    return { data };

However, I’m getting this error on the server (my terminal where I started the dev-server)

Error: CORS error: No 'Access-Control-Allow-Origin' header is present on the requested resource at universal_fetch (<path....>node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:257:12) at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

By what I understand what’s happening here is that locahost is making the fetch-request to that ressource, but it’s not allowed. Am I right in the assumption that I cannot do anything agains that, but the server where the file lives whould have to do change something in their settings?

When I put the same file in the +page.server.js, I can fetch the ressource as the request is coming from my node-server right? I then, can pass the data forward to the frontend right?

I know this is a really basic question, but it causes a lot of confusion for me. Especially because I just tried to read the file with R and the read_csv-function without any issues. Why is that working so smoothly, but the fetch on the frontend is not?

Azure Pronunciation Assessment Could not deserialize speech context error

I am trying to implement a pronunciation assessment system using Azure’s JS SDK (see doc).

I get the following error in console:

“Could not deserialize speech context. websocket error code: 1007”

Here is my implementation:

assessPronunciation(fileUrl) {
    const speechConfig = window.SpeechSDK.SpeechConfig.fromSubscription("xxx", "westeurope");
    speechConfig.speechRecognitionLanguage = "en-GB";

    // Fetch the WAV file and create an AudioConfig
    fetch(fileUrl)
      .then(response => response.blob())
      .then(blob => {
        // Convert the blob to a File object
        const file = new File([blob], "audio.wav", { type: "audio/wav" });

        // Create an AudioConfig using the File object
        const audioConfig = window.SpeechSDK.AudioConfig.fromWavFileInput(file);

        var pronunciationAssessmentConfig = new window.SpeechSDK.PronunciationAssessmentConfig({
          referenceText: "Hello this is a test",
          gradingSystem: "HundredMark",
          granularity: "Phoneme"
        });

        var speechRecognizer = new window.SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);

        pronunciationAssessmentConfig.applyTo(speechRecognizer);

        speechRecognizer.sessionStarted = (s, e) => {
          console.log(`SESSION ID: ${e.sessionId}`);
        };
        pronunciationAssessmentConfig.applyTo(speechRecognizer);
        
        speechRecognizer.recognizeOnceAsync(
          function(speechRecognitionResult) {
            if (speechRecognitionResult.reason === window.SpeechSDK.ResultReason.RecognizedSpeech) {
              // The pronunciation assessment result as a Speech SDK object
              var pronunciationAssessmentResult = SpeechSDK.PronunciationAssessmentResult.fromResult(speechRecognitionResult);
              console.log("pronunciationAssessmentResult", pronunciationAssessmentResult);
          
              // The pronunciation assessment result as a JSON string
              var pronunciationAssessmentResultJson = speechRecognitionResult.properties.getProperty(SpeechSDK.PropertyId.SpeechServiceResponse_JsonResult);
              console.log("pronunciationAssessmentResultJson", pronunciationAssessmentResultJson);
            } else {
              console.error("Speech not recognized. Reason:", speechRecognitionResult);
            }
          },
          function(error) {
            console.error("Error during recognition:", error);
            if (error instanceof window.SpeechSDK.SpeechRecognitionCanceledEventArgs) {
              console.error("Recognition canceled. Reason:", error.reason);
              console.error("Error details:", error.errorDetails);
            }
          }
        );
      })
      .catch(error => {
        console.error("Error fetching WAV file:", error);
      });
  }

I checked the recording (fileUrl) and it’s a working Wav file as expected.

Any idea what’s the issue? Thanks.

Google sheet automation

I am still up coming using Google sheets and coding. I have this project that I am working on. I want to extract certain columns and rows from a csv file and use them to build a table in Google sheet. I also want this process to be automated. I learnt that Google app script would be able to help me do this easily. Please how do I go about this?

Dynamic import of component – missing the getter in Svelte 5

I wanted to import component dynamically to create something like a blog in Svelte 5. Very similar to this approach here in Svelte 3 or 4:
https://github.com/ScriptRaccoon/blog-sveltekit-approach/tree/main

I have this +page.server.jsfile

export async function load() {
    const posts_paths = Object.keys(import.meta.glob('/src/routes/posts_projects/*/+page.svelte'));

    const unsorted_posts = await Promise.all(
        posts_paths.map(async (path) => {
            const link = path.split('/').at(-2) ?? '';
            const component = await import(`../../routes/posts_projects/${link}/+page.svelte`);
            console.log(component);
            const { title, date } = component;
            return { title, date, link };
        })
    );
    return { unsorted_posts };
}

However, when I log the component, there is not title or date. It looks like this:

{
  default: [Function: _page] {
    render: [Function (anonymous)],
    [Symbol(filename)]: 'src/routes/posts_projects/temperature_anomaly/+page.svelte'
  },
  [Symbol(Symbol.toStringTag)]: 'Module'
}

While when I clone the repo from above and log the component I get this:

{
  default: { render: [Function: render], '$$render': [Function: $$render] },
  title: [Getter],
  date: [Getter],
  [Symbol(Symbol.toStringTag)]: 'Module'
}

A post component, in my svelte-5 application, looks like this:

<script module>
    import Post from '../Post.svelte';

    let date = new Date('2025-01-01');
    let title = 'test tile';
</script>

<Post {title} {date}>content...</Post>

I guess I’m missing something obvious here. But anyone got an idea?

update

Ok I got a little confused here. In the original example it’s used the and some variables are exported like this:

<script lang="ts" context="module">
    import Post from "../Post.svelte";
    export let title = "My first blog post";
    export let date = new Date("2023-01-22");
</script>

I wrongly thought that this would be svelte-code, but its just exporting these varibles I think. So just adding the export-statement did the job. My bad

Paymongo webhook not receiving failed payment response

I am currently working on a project where we are using PayMongo as our payment gateway. I am facing an issue with retrieving the failed payment response using the PayMongo webhook.

Whenever I select the ‘Fail Test Payment’ option on the payment or checkout page, the webhook does not detect it, and the payment process does not stop; instead, it redirects back to the payment page to select a payment method.



ini_set('display_errors', 1);
error_reporting(E_ALL);


function logWithTimestamp($message) {
    $timestamp = date('Y-m-d H:i:s');
    if (is_array($message) || is_object($message)) {
        $message = print_r($message, true); // Convert array/object to string
    }
    file_put_contents("webhook_log.txt", "[$timestamp] $message" . PHP_EOL, FILE_APPEND);
}



$payload = file_get_contents("php://input");

if (!$payload) {
    logWithTimestamp("No payload received.");
    http_response_code(400);
    echo json_encode(["message" => "No payload received"]);
    exit;
}

$data = json_decode($payload, true);


if (json_last_error() !== JSON_ERROR_NONE) {
    logWithTimestamp("JSON Decode Error: " . json_last_error_msg());
    http_response_code(200);
    echo json_encode(["message" => "Invalid JSON format"]);
    exit;
}

function searchArray($array, $keys) {
    $result = [];
    
    $recursiveSearch = function ($array, $key, &$found) use (&$recursiveSearch) {
        if (is_array($array)) {
            foreach ($array as $k => $v) {
                if ($k === $key) {
                    $found[] = $v;
                } elseif (is_array($v)) {
                    $recursiveSearch($v, $key, $found);
                }
            }
        }
    };

    foreach ($keys as $key) {
        $found = [];
        $recursiveSearch($array, $key, $found);
        $result[$key] = count($found) === 1 ? $found[0] : $found;
    }

    return $result;
}

$jsonResponse = $data;

$keysToFind = ['id', 'status', 'source'];

$values = searchArray($jsonResponse, $keysToFind);

$paymentId = $values['id'] ?? null;  // PayMongo payment ID is usually the second 'id' found
$paymentSource = $values['source'] ?? null;
$status = $values['status'] ?? null;

$test = [$paymentId, $paymentSource, $status];

logWithTimestamp($test);


http_response_code(200);
exit


I hope to gain insights into why the webhook is not receiving the failed payment response

Change video source on screen size

I want to switch the source of a video depending on screen size. So that it is loading a small and a large video. I hope, that my site perform/loads faster. At the moment it is working with jQuery, but I want it in pure javascript.

Here is my jQuery code:

const mainVideo = $('#myVideo');
    
const medi      = "/videos/ground_540p.mp4";
const large     = "/videos/ground_1080p.mp4";

  switch ( true ) {

      case ($(window).width() >= 1080):
          mainVideo.append("<source type='video/mp4' src='" + large + "' />");
          break;

      case ($(window).width() >= 720):
          mainVideo.append("<source type='video/mp4' src='" + medi + "' />");
          break;
  
  }

That is my pure javascript:

const mainVideo = document.getElementById("myVideo");
    
const medi      = "/videos/ground_540p.mp4";
const large     = "/videos/ground_1080p.mp4";

  switch ( true ) {

      case window.innerWidth >= 1080:
          mainVideo.append("<source type='video/mp4' src='" + large + "' />");
          break;

      case window.innerWidth >= 720:
          mainVideo.append("<source type='video/mp4' src='" + medi + "' />");
          break;
  
  }

In my firefox inspector it is displayed, but it is grey. It is not showing(not loading) Here is a image:
enter image description here

I hope, this a good way.. and my video is not loading twice.

instagram reels auto like puperteer-extra

We found that var spanElement = document.querySelector(‘div > section > span’); also var spanElement = document.querySelector(‘div > section > div > span’); for reels found a span for like button. but when we try to use this button on JS though .click() method or though puperteer button not clicks why so can be

How to Integrate Salesforce with gummimattenkaufen.de for Better Sales Automation?

I am running an e-commerce website, gummimattenkaufen.de, and I’m interested in integrating Salesforce to streamline our sales processes and improve customer management. Can someone guide me on the best practices for connecting Salesforce with a Woo Commerce-based site and automating sales workflows? Any examples or resources would be greatly appreciated!

I attempted to integrate Salesforce with gummimattenkaufen.de by following the standard API documentation for Woo Commerce. I expected a seamless connection between Salesforce and the website for automating customer management and sales workflows.

How to render Vue web component?

I have been using Vue3 for a little while and I am trying to separate my components into web components so I don’t load what’s not required and I increase page speed.

I’ve been watching various YouTube videos and reading various articles but I’m not sure how to do it properly.

I was following this article and I’ve managed to build my component but I can get it to render. I get the following error

Uncaught TypeError: Failed to resolve module specifier “vue”. Relative
references must start with either “/”, “./”, or “../”.

I have included vue cdn and my component

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script type="module" src="{{ asset('js/newsletter-form-ce.js') }}"></script>

What is the right way to include my component and render it?

Javascript fetch() always gives Content-Type “text/plain” in response header in Chrome

Using this code in chrome with a url targeting a .jpg file always returns “text/plain”, but when i do the same in Postman the content-type is image/jpeg, which is what i expect. Why does fetch give me a different content-type? I need a front-end js solution which allows me to obtain the “true” content-type in the response. How can I achieve that?

(async () => {
const reponse = await fetch(url, {
  method: "GET",
});
console.log(reponse.headers.get("Content-Type"));
})();

JS task adding to a html page

I’m trying to add task with date to my task section dynamically. The popUpWindow to add the details is working fine but the addTask() where the task is added to the task-container is not working when the date in entered. It works only when name is input. I don’t know where my problem is.

function popUpWindow() {
    var addTaskPopUp = document.getElementsByClassName('addTaskPopUp')[0];
    var addTaskBtn = document.getElementById('addTask-btn');
    var close = document.getElementsByClassName('close')[0];

    addTaskPopUp.style.display = 'block';

    close.addEventListener('click', function () {
        addTaskPopUp.style.display = 'none';
    });

    window.addEventListener('click', function (e) {
        if (e.target == addTaskPopUp) {
            addTaskPopUp.style.display = 'none';
        }
    });
}
function addTask() {
    var taskName = document.getElementById('taskName').value;
    var taskDate = document.getElementById('taskDate').value;
    var taskContainer = document.querySelector('.task-container');
    var task = document.createElement('div');
    task.className = 'task';
    task.innerHTML = '<input type="checkbox" id="task2" name="task2" value="task2"><label for="task2">'+ taskName +'</label><p>'+ taskDate +'</p>';

    taskContainer.appendChild(task);
}
<div class="task-section">
    <h2>Task</h2>
    <div class="task-container">
        <div class="task">
            <input type="checkbox" id="task1" name="task1" value="task1">
            <label for="task1">Task 1</label>
            <p>2 December</p>
        </div>
    </div>
    <div class="task-btn">
        <button id="addTask-btn" onclick="popUpWindow()">Add Task</button>
        <button id="completed-btn">Completed</button>
    </div>
</div>
<div class="addTaskPopUp">
    <div class="addTaskPopUp-content">
        <span class="close">&times;</span>
        <h2>Add Task</h2>
        <form action="">
            <div class="form-row">
                <label for="taskName">Task Name:</label>
                <input type="text" id="taskName" name="taskName" maxlength="20" required>
            </div>
            <div class="form-row">
                <label for="taskDate">Due Date:</label>
                <input type="date" id="taskDate" name="taskDate" min="<?php echo date('Y-m-d'); ?>" required> <!-- the min will set the minimum date to today and disable the past date -->
            </div>
            <button type="submit" id="addTask-btn2" onclick="addTask()">Add Task</button>
        </form>
    </div>
</div>

I expect for the addTask() is capable of adding a task to the task-container.