Category "javascript"

NodeJS app can't work because of dependencies script being blocked due to MIME type error

my teammates and I are currently developing a web game with babylonjs and we need to deploy it on heroku. So I created a file app.js to be the "server" side, he

Why am I getting an error in my Route Redux code?

I can't find my error in the code. Could someone explain to me. Test: Nav:' should be rendered on the path "/". The "Home" component should be rendered only on

Have a paper js file that can be imported as a module

I am making a game and I would like to have my code split into two files. One, an ordinary javascript file for the gameplay, the other a paperscript file for al

React render message to stay at the bottom

Currently working on a 1:1 live chat messenger. when i send a message its shows up at the bottom of chat where i want it to, but upon page refresh it returns to

which/how to properly use a loop for html change with Javascript?

I am new in Javascript and trying to change the HTML content of a line. I've been helped a little by a friend who made this code for me, but I'm running into ma

Top level await in WebdriverIo Mocha tests

I am trying to use top-level await with WebdriverIO but keep getting below error [0-0] import axios from 'axios'; [0-0] ^^^^^^ [0-0] [0-0] SyntaxError: Cannot

How do you test a form upon the submission addEventListener with jest without a framework only vanilla JS

Most of the research I have done in regards to jest testing unit testing and/or integration testing is all heavily geared towards React. But I am not using reac

How to set data in Firebase .onSnapshot()

I'm trying to set data with this function and its not setting the variable. How can I set information for outside use with this? Here is my code const docRef =

VueJS - create readonly copy of a ref object (Composition API)

I am getting data from db by onMounted hook and showing object in a form. When user clicks to save, I just want to check if object data has changed or not. onMo

Why my Interactive Art is not working like it should on mousemove

I made an Interactive Art but instead of scaling each child different pixels it is scaling each child same px. P.S the commented out code const WIDTH = 512

Firebase addDoc not writing data to Firestore

I'm trying to write some data to my Firestore database. I've been following Firebase docs but for some reason nothing is being written to my database. I'm not r

How do i use chartjs in react project properly?

Im trying to use chartjs in my react project but it doesnt work. What am i doing wrong? You can see console logs here: logs import styled from "styled-compo

Remove punctuation at end of line in responsive text block

I have a list of a large number of Things divided by bars, i.e. Thing 1 | Thing 2 | Thing 3. They're in a responsive container and so I have no way of knowing w

Django : Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Error When Click Button for send data. Please Helping me to solve problem. Error When Click Button for send data. Please Helping me to solve problem. Error When

How to read the user input on the client-side, modify it with JS on the client-side, and then POST it to the sever-side (Node.js)?

Problem: I want to read a user input on the client-side, do some processing on the variable using JavaScript, still on the client-side, then POST the modified v

How to send an email from JavaScript

I want my website to have the ability to send an email without refreshing the page. So I want to use Javascript. <form action="javascript:sendMail();" name=

How do I send fetched data from chrome extension background script to content script?

Once an event is triggered in my content script, it send a message request to the background script and waits for a response. content.js chrome.runtime.sendMess

How to paginate in react using inertia on laravel?

How to paginate in react using inertia on laravel? pulling the paginated data: $contacts = Contact::orderBy('name', 'asc')->paginate(10); return Inertia::ren

Pushing value to array that is the value of an object

I have the following structure: let mappings = { "1002": ["1000", "1003"], "2000": ["2001", "2002"] } and I want to add this piece of data const issueT

Infinity loops with useEffect and useCallback - Reactjs

somehow I got an infinity loop, the weird situation that I did solve it but I got a warning and I wish to fix the warning. this is code that work: import { Arro