Category "javascript"

How to use yup validation on dynamic form using react-hook-form with useFieldArray

I'm trying to create a dynamic form using react-hook-form's useFieldArray hook. The user should be able to add or remove fields, thus making it dynamic. I've lo

Nodejs + html evt.target value is undefined

Okay so here's my html code document.getElementById('comment-form').addEventListener('submit', async (evt) => { evt.preventDefault(); const userI

Communicate between base window and popup window Angular 12

I need to trigger some event from the base window to a popup window when a user tries to open the same popup window again, which is a gear icon dropdown. What a

Is there any way to customize Google's Auto complete address result?

I want to customize auto suggestion result. I want to add more two addresses at the top of the result. Is it possible using google api? for more understanding I

How to make a button that teleports randomly on the website onclick

At the moment I wanted to create a button that teleports randomly back and forth on my website. As I am very new to JavaScript, I did not get it right. That's w

JavaScript FileReader Slice Performance

I am trying to access the first few lines of text files using the FileApi in JavaScript. In order to do so, I slice an arbitrary number of bytes from the beginn

Declare an array in TypeScript

I'm having trouble either declaring or using a boolean array in Typescript, not sure which is wrong. I get an undefined error. Am I supposed to use JavaScript s

Sticky Sidebar In React.js

I tried some packages as well as a jquery solution for the same questiion. (I copied the question because of its good explanation). But I want it in React. Help

How to create line breaks in console.log() in Node.js

Is there a way to get new lines in console.log when printing multiple objects? Suppose we have console.log(a, b, c) where a, b, and c are objects. Is there a wa

Add role to user from DMs?

So I'm making a verification bot for one of my Discord Servers, and I've come across a problem. Purpose: When the user first joins, they will be only allowed t

How to convert Javascript array into CSV file and download it from Chrome Extension?

Hello i am new to Chrome Extension and developing it in angularjs and i am trying to convert array into csv file and download it from Chrome Extension. i have

Why in NextJS, logo is not visible when visiting from page URL

My logo is not loading with /page URL Screenshot Here is my components/LayoutWrapper.js import Image from 'next/image' import icon from '../assets/images/Icon

How to block cookies until consent is given with Javascript [duplicate]

My company has given me the task of creating a cookie consent package that can be included in any of our different Javascript single-page appl

Highcharts bubble map does not always render properly

I have created a shiny app, which displays a highchart Map. With a select input, one can choose specific countries that one wants to be displayed. Most of the t

How to properly check all checkboxes and change states with Vue?

Been searching for a while for this issue, now I work to select all checkboxes: 1.- When the checkbox labeled as "Seleccionar Todos" is checked, must check all

Extracting a type and constraint from a Joi schema

If I have a schema: const schema = Joi.object({ title: Joi.string().trim().alphanum().min(3).max(50).required().messages({ "string.base": `Must be t

How do i save the authentication with puppeteer?

I need to talk to a telegram bot, with my web app. So i decided to do a web scrapping, i do not know if its the best strategy. When i try to access the telegram

Why am I having too many re-renders in my React.useEffect()?

I'm still beginner using ReactJS and I'm not understanding a problem I'm having. My useEffect is getting a list of data and after that I do a filter. But when I

How to implement build in function .eval() with recursive function

Hei Coders, I have a string "1+1", with javascript build in function eval() i can do eval("1+1") so the return value will be 2 But how about if i want to imp

static/css/main.61381647.css from Css Minimizer plugin at parse (<anonymous>)

Describe the bug I am learning react,in fullstackopen,I want to build,but failed,I do some thing like this for example rm -rf package-lock.json rm -rf node_modu