Category "javascript"

Not able to send files data from front-end (react.js) to back-end (node)

I have an application that stores to its state files' content, whether images, audio or both, as shown here with the mediaAudio object key: In my react.js code

Filter an object by value from array [duplicate]

I have an array of object b and an array a. I would like to filter b to only have objects where the to values are in a. I've tried many ways b

Randomly Populate table rows in Pug files

Until this morning, I did not know what Pug is. However, now, it's being used in a theme that I am using for work. Ran into this situation. The current pug file

MUI Radio button disabled change value when Select drop down changes

My problem is that when I change a value in a dropdown I want to disable two radio buttons and change to the correct radio button. I am able to disable the radi

Match variable value to array's index to get month

example of getDepart date format getDepart = 2022-04-29 desired result 29 APR, 2022 const getStringDepart = () => { const months = ["JAN", "FEB", "MA

How to test webflow website without publishing

My client built the website using webflow but there is a bug in there. I tried to find a way to test the code (console.log etc) but seems like the only way of d

ManifestV3 new promise error: The message port closed before a response was received

I'm working on an extension that does a lot of message-passing between its content scripts and the background service worker (manifest V3), and I've noticed an

CDK drag-drop is not working in Tablet device

I'm trying to use the Angular Material CDK Drag-Drop module from https://material.angular.io/cdk/drag-drop/overview It is working in desktop device but it is no

Trying to loop through firebase and display each object as a card React

My data is structured like so [1]: https://i.stack.imgur.com/dWsr3.png I am trying to loop through the database and put the data from each card into props for m

Next.js Navbar gives a warning of Target Element not found when clicked

I am currently working on a next.js app, which contains a connect wallet button found to the right of the navbar, with the navigation links to the left of the n

Firebase logs "undefined" on console when it should not

I am using firebase 10.9.2 (Latest version) I use the onValue function to go through the data in my live database. For some reason, it always logs (and is set t

Javascript Custom Array.prototype.method logs 'not defined' [duplicate]

So, I've never done this before, trying to add a method to the Array.prototype. See console.log statement below for usage. It keeps telling

How to move local File object in and out of Shared Array Buffers JS

I have a web worker running in a while(true) loop, the code is too deep to change it at this point in time. The worker can access a Shared Array Buffer, I have

Is there a way to override what useMemo does to determine if there's a change?

useMemo(() => expensiveFunction(), [deps]) re-executes the expensiveFunction when the deps have changed. I was wondering... is there a way to control how Re

Disabling Ctrl+T in web browsers

I'm stuck with a shortcut problem. Javascript is not a language I've used much, and the answers I've searched didn't help. I'm creating some tutorials for a spe

Gender radio input and fields of interest checkbox undefined in alerts

Can anyone help me why the gender and fields of interest output are undefined? I can't seem to get it no matter how I get the value and its getting out of hand

Add Button to Modebar to display in Fullscreen (Plotly JS)

I would like to add a custom button to the plotly graph to make the graph full screen. I have seen some solutions for the programming language 'R' but I did not

Schema for saving a lot of questions MongoDb

If I have a survey application for child tracking what is the best way to save survey questions in MongoDB? Knowing that survey is divided into stages (about 12

What are my options to deal with this stale closure in React besides using ref

I'm using the library React Datasheet Grid, the main component has a property called OnActiveCellChange, to which i'm passing my custom function: const [selecte

How to use the visibilitychange event to display messages when tab is hidden?

When an customer opens a new tab or goes away from the current sites tab, I'm trying to insert an promo message in the tab of a browser that flashes back and fo