Category "javascript"

Redux toolkit: Uncaught TypeError: Cannot read properties of undefined (reading 'type')

I get the following error when I add a specific action in the extraReducers inside a slice: Uncaught TypeError: Cannot read properties of undefined (reading 'ty

How to enable npm-check?

I am having a problem with the npm-check package that I installed. I already installed it globally, and when I try to run npm-check it says: npm-check.ps1 cann

How to send table dropdown select fields to flask

I have a table composed of three columns, a text and two other select fields. When the user chooses an option from the dropdown select, I would like to send the

Problems with asynchronous calls in chrome extension

I had this idea for a new chrome extension: It should create a linking QR code for the currently open website, displayed in the popup.html which can be easily s

How to change HTMX behavior to replace the full web page if form is invalid

If this form submits as invalid, I want to override the htmx and do a HttpRedirectResponse that refreshes the full page instead of just changing the div, #super

How to use routing in vue js?

I am working on a vue js project, to use the router , I installed via command -> npm install vue-router and created a router.js file , but when i try , npm r

How to use useState hook with Preact and no build tools?

Currently I need to get a Preact application working without any build tools, just with an index.html with the import statements to get preact from the CDN. I'm

Select in form - Problem mapping through options, cannot read properties of undefined (reading 'map')

I am creating a SELECT inside a form in which I need to map through an object (I know mapping through an object instead of an array might be a problem). I am us

Replace HTML code with code from another page

I have got two html files, say page1.html and page2.html. In both files I have an article element. Now, on page1.html I would like to replace the content of the

How do I change the default thumbnail of an embedded youtube video? or how to put an image over a video and make it disappear on click?

I have an embedded youtube video on my site and modified the code so the name bar and youtube bar are not visible by using the code here. It works perfectly by

why is my clientwidth/100 different than my width by percent?

I have a small program that when you press down on ArrowDown, the circle should move downwards from its position on screen. The issue I have is that my initial

How to make bot grab perma server invite link

I'm working on a bot project that has invite feature, currently I'm having trouble with this command that allow bot to grab server perma invite link (that made

Roll up: typescript error (!) `this` has been rewritten to `undefined`

I am having issues with rollup this has been rewritten to undefined during rollup. Please someone should help me out on this. I found a hint online "you can u

how to have external link in require() in <img> tag src

I have the exact same problem as this question: Linking to images referenced in vuex store in Vue.js However, unlike the question, I have external link for src

How to make a custom pattern from selection in Photoshop?

TL;DR - I want to use code to define a custom pattern from selection in Photoshop using scripting (Extendscript). Here is the code I have so far: (function

track.stop is not turning the camera off anymore

I have a webpage where I want user to take a picture with his laptop/phone camera. Once he clicks on a button a modal is shown and the following js will start t

Add smooth scroll in localstorage favorite list

I have a good working javascript code which scroll page to the id of specific favorite item. But the scroll is just a jump from item to item. What I want and ca

Here i have a toggled the div but i want to toggle on perticuler div not all

First picture without clicking on edit button Second picture when i click on edit button So here i want is when i click on which ever divs edit button at that p

Drawing an irregular circle with an array of points

I'm trying to draw an irregular circles that animates for the first n number of frames in a sketch. What I want is to generate points and then to draw a line fr

How can I solve the css and JavaScript errors in React deploy?

jsx works well on the page. However, when there is a code like below, 'hello' cannot be printed on the console. useEffect(()=>{ console.log("hello"); },[])