Category "javascript"

Read, edit the data and download multiple files in pure JavaScript

Firstly, I allow users to upload multiple files. Then I use loop with fileReader to read all the uploaded files. Next I edit some data of each file and create n

Login with biometrics (fingerprint) throws an exception only in Chrome (mobile)

I am trying to use fingerprints to login to a pwa on mobile devices only. I found the code from an example at https://developer.mozilla.org/en-US/docs/Web/API/W

Paypal Buttons - CC not working "Things don't appear to be working at the moment"

I have a simple paypal button implementation for subscriptions <div id="paypal-button-container-P-7WX14668TE0595539MJ4J77A"></div> <script src="h

How can I solve Uncaught TypeError?

While trying to push element in array, I receive an error: main.js:1 Uncaught TypeError: Cannot read properties of null (reading 'document') at main.js:1:50 H

Struggling with an element in my Javascript code

I am to make a script that will ask the user to enter numbers until they type quit. I have this working, but I am struggling with the final element where I hav

JavaScript: Best way to add custom properties/methods to built-in objects (e.g. arrays)

It is known that you should not customize the built-in prototypes in JavaScript. But, what is the best way to add custom properties/methods to specific instance

javascript split array in two arrays

I am trying to split this array into two different arrays using the values inside the first array. This is my initial array: "carList": [ { "b

Popup which persists through page redirect Next.js (React)

I am using Next.js for one of the projects that I work on. I wonder if someone could help me with an advice on how to show a popup (popup component, I think it

JavaScript - How do I print an input inside an array? [closed]

I already tried many ways to solve this, but it always returns undefined. What should I do to solve this issue? function printThreeFavoriteCol

Laravel Livewire set is Removing Map Marker

I am using Laravel 8 with Livewire and am displaying a Mapbox map in my page. When I click on the map, I am getting the coordinates of the click and placing a m

How to invoke a lambda function in aws-sdk v3

How can I invoke a lambda function using Javascript (TypeScript) aws-sdk v3? I use the following code which does not seems to work: // the payload (input) to th

How to add an icon in password field to show & hide password in rails

My code: div.form-group.col-md-12 label =t('.password') = f.text_field :password, required: true,

How do I change the language of moment.js?

I am trying to change the language of the date which is being set by moment.js. The default one is English, but I want to set the German language. These is what

How to create text border radius without wrap view in React Native?

In React-Native, how do I set borderRadius to Text-components? I've tried using borderRadius in text stylesheet but it not work: import { formatPhone, mapNameWi

having issues adding functionality to skip, play and pause a react music player

Below is the code with the react component, there is functionality to the play and pause button also the ability to skip to the next track or previous track. Sc

My useState in React/NEXTjs is not appending the result from a socket.io event from the server, just overwriting it

Frameworks used: Next.js, Socket.io, React I am making a simple messaging app. I am basically just emitting a message someone types, sending that message to the

Understanding and updating the gun user alias system

On the gun alias system: Is it like a phone book (public key book) where every user could have a different name for each key? Is it stored in a user's user spac

eventlistener not functioning when post request is sent

I am trying to add a number indicator to my cart icon that will display the number of items added after the product has been saved to my database. <div class

VSC Default Directory for IntelliSense?

I use the code-runner extension in VSC to run untitled files on the fly, which is super helpful for quickly testing code snippets. Under the hood, the extension

GET json api data in datatable with axios and vuejs

I have a datatable and I want to pass the data according to the api that returns a json using findAll() from the sequelize.. But in console.log when I call the