Category "javascript"

How to create a global string in a vue (webpack) project

In my vue project I have a default image that should show up in places around the app when an image is missing or hasn't been uploaded yet. I have various class

Need a Click and Drag solution using Vanilla Javascript without jQuery

I have to do a click-and-drag solution for a background image in Vanilla Javascript for a project. I found this solution using jQuery in Codepen. Can anyone hel

Vue 3 - "Failed to resolve component" with child component

I have this SocialNetworks.vue component <template> <div class="socialNetworks"> <SocialLink to="https://twitter.com/" icon="twitter.svg" n

Ability to load component while axios

Is it possible to do the following: There is a spinner component. axios: method() { SPINNER (component) -- on axios.get('/shop', { params:

While loop not terminating even after the 'return'

I am using the while loop to iterate through an array and trying to terminate the loop using the return (I tried foreach before which doesn't terminate for retu

call javascript void in angular

I am using an html template for a website in Angular This template uses JavaScript to perform page elements. My problem is that when I use ngfor to create an el

How to find element from html with jQuery

I have a table with checkbox option for each row. For each row I have href (dedicated link) handled by HTML file. I have created a button called: "download" by

ethers.js Contract object gets error: Uncaught TypeError: Cannot read properties of undefined (reading 'map')

I hope someone can enlighten me. I have a website with a button which should create a new Contract object of my token contract via the ethers.js library. I succ

Can't pull sqs queue name from .env file in nestjs

When pulling the queue name through .env file I get the following error on the console: Cannot read properties of undefined (reading 'meta'). How can I pass que

How to subscribe a new member to mailchamp using node.js and express

I am trying to work with an API, specifically mail-chimp API, but the problem that I am having is: const express=require("express"); const bodyparser=requir

Fastify - How to get non-file fields using fastify-multipart

How to access text from request that are non-file fields? (I am using Insomia) Our request using Insomia We are able to access file fields by looping through p

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