Category "javascript"

text file upload line by line getting "\r"

hello everyone I want to get the data line by line I have done it successfully now I want line by line plus word by word so I used this code var openFile = fun

multistep form with fieldset is not going to next fieldset even if required field is filled

I have a multistep form with fieldset, but on the next button click, it is not going to the next step it still shows the required field is empty. Blade <form

Discord Bot Auto Deletes Links In certain Channels

im pretty new to javascript and i tried to get and modify a script that delete link if its not in the list, i tried multiple modification for hours but none suc

Hide and show element and stay with the same option selected

i have this code if checkbox is checked i need to show my front_dashboard_custom_formula div and hide front_dashboard_formula_formula_id and set select null if

React - Why is geolocation state undefined when accessing it from another function

I'm trying to get the latitude and the longitude from geoLocation and use it to fetch data from a weather api. The problem however is that as soon as I pass lat

Changing the data in a child component without changing it in the parent

I am making changes to a set of data and the data is held in a parent components state I pass that data to a 2nd component but when I make changes to the data i

Jest test passes but .. has console message You are trying to access a property or method of the Jest environment after it has been torn down

My test passes but has a console refrenceError: You are trying to access a property or method of the Jest environment after it has been torn down. Test: import

Intersection observer - How do you remove a class after leaving the view port

I am adding a class when a div gets into the viewport using Intersection Observer. I just can't figure out how to remove the class when the div leaves the viewp

Adding new user information from Firebase v8 to v9

I have a code to create user with image and username to Firebase v8 and I can't replace it to Firebase v9. Can someone help me? Thank you! import { useState

How to filter an array by deleting a tag?

i'm trying to refilter an array but the path to access the choosen parameter seems to be a bit tricky. The full project is supposed to filter on 3 parameters bu

How to include Tailwind CSS styles from React component library into the app CSS bundle?

G'day, I am building a React component library with TailwindCSS and ViteJS. The library outputs each component as a separate JS file, for example: // @component

Visual Studio code TypeScript language service died

have anyone faced with such a problem in VS Code : "The TypeScript language service died 5 times right after it got started" . Screens are below by link : (

How to change color of checkbox values

I want to change color of checkbox values like if it's checked it shows text in green if its unchecked it shows color in red here is simple input type but I am

Testing async methods in jest gets mock resolved values mixed up

I'm writing some jest tests to test an async method. If I run each test individually, it works! However, when I run the whole suite, they fail. The mock values

Pad a number with leading zeros in JavaScript [duplicate]

In JavaScript, I need to have padding. For example, if I have the number 9, it will be "0009". If I have a number of say 10, it will be "0010

How to user filter with Firestore database in React Native?

I want to filter the firestore query to get all docs that do not contain a specific value. I used @react-native-firebase import firestore from '@react-native-fi

How do I upload a webcam image using JavaScript ajax to a Django site?

I am creating a livestreaming site using Django and I need to upload an image using an ajax post request to a model form on the django site. I am working with t

res.send return two or more items from a map method

I'm doing a get request and it fetches properly. From there I have to return that data based on the if statement, but the data needs to be returned as an object

How to use localStorage across web pages

Well, I'm trying to integrate two web pages (index.html and comunidade.html), where the first one is a form where you input some data and the second one is the

Angular Ag-Grid row group empty render when querying DOM elements with angular-testing-library

I have an ag-grid that contains different columns and column groups, as well as row groups. I am trying to test the DOM elements displayed in the row group usin