Category "javascript"

How to stop the Api icon keep adding when click the buttons?

I have to create a web with two buttons to show each city's information. When I clicked the button the icon would keep adding every each time i click it. I have

I can't add labels to svg path

I want to add a custom-styled label to my object. this is my code of SVG: <svg height="512" version="1.2" viewbox="0

D3.js Arc Diagram - Tapered Ends

I have an arc diagram that is based on this blocks example, and I'd like to taper the ends of the arc path so that they are hidden behind the circles (or at lea

How can I write this function into my existing code, Keep getting a promise rejected error

Hi I am trying to Include the function below into my existing code so that after the users are filter based on matching city they will be filtered by the most m

Should I use useImperativeHandle hook when needing multiple refs

I am building component(ThePieChart) where I need to perform quite a bit of DOM manipulation on its elements. Those manipulations I need to perform in parent co

Code works (mostly). But failure to remove duplicates

Summary: Hey I've got a filter for some data. It's filtering fine but it's not removing duplicate objects. Arguments taken in order: 1. datasource 2. filters (r

Detecting WebView2 vs standalone Edge browser?

I have a page that needs to render differently depending on whether it's being viewed from a WebView2 component (inside another application) or from a standalon

Perform an action after clicking on the link

I'm new to JavaScript, I need to perform an action after clicking on the link. For example, we have two pages A and B On page A, I perform a JavaScript action (

Latest version of iOS Chrome not downloading blobs correctly (pdf)

The below code samples works with: Chrome Android Chrom Windows Safari iPhone Safari Mac Chrome Mac Doesn't work with: Chrome iPhone Sample 1 var oReq = new XML

Laravel Mix HMR Server Does Not Launch

Laravel Mix Version: 6.0.43 Node Version (node -v): 16.13.1 NPM Version (npm -v): 8.1.2 OS: Windows 10 21h2 Description: THIS IS HAPPENING ON A FRESH NEW INSTAL

Is there a way to determine the current font-size of a DOM element in ReactJS?

In our app, a piece of text changes font-size using a CSS class with responsive breakpoints. But some users want fine-tooth control over the font-size, so we ha

Webdriver io - Drag and Drop | Not able to see it happening but code passes

I am trying to implement the Drag and drop feature using webdriver io and the issue i am facing is that the code passes but i dont see dragging and dropping the

Element not appearing on hover

I made a basic website header and the respective menus should appear when you hover over the options but it doesn't work. When hovering over the options "Home"

Pipeline test fails because of time difference of local and pipeline environments

I have problem surrounding the difference between pipeline execution and my local environment. I'm intercepting a request using the following command: cy.in

How do I copy to clipboard using clipboardy?

I am trying to use clipboard in order to copy 'longlat' to the clipboard by passing it through the function 'copyData()'. However, it keeps giving me errors. Th

Find a javascript fix pattern

I have many javascript files, one of which has code with an error and the other without. How can I find the difference between them in order to find a pattern o

Mongoose data Writing issue in Javascript

Just started with a javascript couple of days back. I am trying to use MongoDB with mongoose to write the data but it is not writing even though the connection

Nuxt 3 with Vuetify Icons

I am trying to get Vuetify 3 to work with Nuxt 3. I have a plugin for Vuetify: // plugins/vuetify.ts import { defineNuxtPlugin } from '#app' import { createVuet

Handle currency format in grid columns value

I'm trying to handle some currency values in my grid (us dollar, euro, etc.) I find a way to set it up into my grid, using grid column template for now I have t

Fill bootstrap 5 modal with mysql record data using javascript fetch/ async/await with ES6 notation so as to update the record

All of this code works. It activates the BS5 modal and fills it with a record using a stored procedure on MySQL db. The issue was calling the wrong variable. If