Category "javascript"

If there is an active class on two buttons, how do I add a function specific to the buttons with the active class?

This is my first time posting and I'm also very new to javascript. I've had this problem for days and have tried various solutions but none have worked. I have

How to return the response from an asynchronous call

I have a function foo which makes an asynchronous request. How can I return the response/result from foo? I am trying to return the value from the callback, as

How to pass id in path url as component property in react router v6 [duplicate]

I'm updating an outdated tutorial project using react hooks and react router v6. I want to pass the id in the path url to the component proper

Bootstrap 5 Show Modal Code Behind (Asp.net C#)

I tried everything but I couldn't success it. <script type="text/javascript"> function openModal() { var myModal = new bootstrap.Modal(doc

Would like to write a javascript that helps me to find documents in a folder

I would like to write a js for an offline website (located on a local Windows server or any other server). It's supposed to look for files like PDFs in several

how to handle lazy import in functional component react js avoid import befor need to render

Get data from multiple form it causes load more and become slow. How to avoid import or run code before render the element. Here the below code run both element

Trying to Populate a Grid of Coordinates into a Multidimensional Array Using Nested Array Map Methods

I'm trying to populate a grid of coordinates into a multidimensional array using ES6 nested map methods using this code: var gridSize = 4; var regionA

Is there a better way to refactor this function using the Lodash library?

My goal was to take a list of blogs and find the author with the most blogs returning an object like this { author: String, blogs: Number }. I was successful, b

Chart JS Tooltip Currency Problem - Stacked Bar Chart

I use ChatJS and i want to add an € Symbol after every number in the Tooltip. On my most charts it works perfectly but the Stacked Bar Chart makes me probl

Run function only once for particular element [duplicate]

I am building a simple todo app and I am new in JavaScript and I am stuck in a problem. I am trying to run function only once for a particular

vuejs3 : can't import axios globally

I can import and use axios in a component: import axios from 'axios' export default function usePostLogin() { const login = async (url , data , callback) =>

java script function for filling a list

I wrote a function that enters personal information into empty list and save them. I want to add one by one but if first name and last name have entered before,

How to Make Input Checkbox Update Price Total Using Values + Include Additional Fees for Total?

So I made this basic checkbox price app that updates the food price whenever you click on a checkbox option https://codepen.io/shodoro/pen/GRQNXyq However, I ha

TypeError: cleanUrl is not a function while creating a React Project

Hey everybody I am getting this error after hosting a website on firebase or I am not sure about it. It's the replace-info.js screenshot. I am not able to fi

Graph not being displayed on django framework

I want to display a graph using C3 Javascript library which displays future prices of textile raw materials on django framework. When I run the code it does not

How are Highcharts event listeners handled

I have a react app which shows some chart visualizations using highcharts library. There are some custom extensions used on top of Highcharts implementation. Hi

Can't combine a hook and a function in onClick event

I'm new to React. This is a 3 step registration form. In the last step - StepThree, I've been trying to have a hook - handleDateChange and a function - HandleUs

How to use resemble ai api

I have tried to create a project in which I can use my voice in text to speech in Javascript but I recieved an error saying this. https://i.stack.imgur.com/fnIp

Chaining an axios.get call to use the response for an axios.all multiple request

I'm having difficulties to understand how Shall I handle this type of calls. I need an initial axios.get call and loop through to make an axios.all call. This i

Trigger A Python Script By Using JavaScript

I am doing a little project where i have prepared the back end in python and the graphic user interface woth HTML, CSS & JS. The python script doesn't requi