Category "javascript"

Playing background music in a React app using Howler

So im using Howler to play background music when my React app is loaded. So I store ID of the instance of Howler(i.e is responsible for background music) using

How to run npm start without opening browser for react development on linux

I am learning react and find myself running npm start on the terminal a couple of times but its annoying how it opens a new browser window everytime. I'm tryin

Open other webiste in new tab alogn with my website

I have a website-1 (www.example.com). When a customer reaches out to my website, the other website-2 (www.example2.com) should be open in a new tab correspondin

pdf.js get password-protected file content

I want to retrieve the content of a password-protected file as a File object using PDF.js library. I tried to get the raw data from the promise and convert it t

humberger menu stop scrolling main body css

I am trying to implement a hamburger menu. My expectation is when I will click on hamburger menu then the whole screen will contain only hamburger menu and ther

NestJS/TypeORM: Cannot set property metadata of #<Repository> which has only a getter

I try to run my nestjstutorial app, the below error is showing. My backend is connected to a PostgreSQL db. TypeError: Cannot set property metadata of # which

`react-query` mutate onSuccess function not responding

query, I'm making a bulletin board right now. So, I put the values ​​of title, content in the Form information into the react-query function onSucce

how to sum 2 numbers in javascript before saving it in mongodb database

I'm building a web app using MERN stack. I want to sum 2 numbers then save it mongodb database. Here current num is from database and other is from input field

locomotive scroll disable the scroll of my page

When I put this function : const scroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true }); The scroll of my page n

Uncaught (in promise) Error: No ethereum object at checkIfTransactionsExists (TransactionContext.jsx:105:13)

Here is my TransactionContext.jsx TransactionContext.jsx:105 Uncaught (in promise) Error: No ethereum object at checkIfTransactionsExists (TransactionContext.js

Sum of values in javascript object

I have the following javascript object const reizen = { personen: [ { naam: "Bob", reizen: [ { locatie: "Frankri

HLs.js stuttering audio stream on Safari only

I am using Hls.js to stream live audio for radio, and it works well on chrome but the audio is stuttering on Safari only. Here is the code sandbox example(kindl

v-bind:style for dynamical value in Vue.js

When I use v-bind:style for using dynamical value, I came across the problem that v-bind:style doesn't work but I'm sure v-bind:style gets correct value(:style=

want the app to save state separately according to each user in react native

I have a app that conducts a test and when the currently logged in user passes the test, the app shows a modal telling him that he has passed the test. I want t

GET method gives success but PUT method gives 401 despite same credentials

The problem Overview When getting products using a GET method everything works when trying to update a product using PUT method I get 401 unauthorized I use sam

Having trouble using List.js to filter student profiles in JavaScript?

I am trying to filter student profiles via an input field. JavaScript grabs the data via an API and then using a return function I display the data on an HTML p

How to verify ReCAPTCHA token in js?

I have written the following function in js to verify a ReCAPTCHA token: export async function validateHuman(token) { const secret = "funny_little_secret";

TypeError: _API.default is not a constructor with Jest tests

I have an API class that I am trying to use in a React app. // API file class API { ... } export default API; // Other file import API from "utils/API"; con

To get the default printer name

To get the default printer name . This code is what I am using, In order to get this <script language="javascript" type="text/javascript"> function

How can I use javascript to hide by default the navigation links in my navbar on small screens?

I set up my navber using tailwind css and was able to make it responsive. When viewed on a smaller screen the navigation links are displayed underneath each oth