Category "javascript"

Next-Auth : How the registration is handled with a email + password credential provider?

How the registration is handled with a custom credential provider ( email + password)? Currently my [...nextauth].js looks like this: import NextAuth from 'next

Why does jQuery or a DOM method such as getElementById not find the element?

What are the possible reasons for document.getElementById, $("#id") or any other DOM method / jQuery selector not finding the elements? Example problems include

How to make React Native Component background transparent?

I am using Tab Navigation which contains two screen, I need to make the background of each screen transparent so the app background is visible. This is how it l

body-parser deprecated undefined extended: provide extended option

body-parser deprecated Why is bodyParser no longer required and what are the alternatives besides: app.use(express.urlencoded({ extended: true }));

how can i add inline javascripts to navigation template in Google App Scripts

I am trying to develop a navigational menu being referenced to different pages in my app. am using Materialize css as a ui and placed the nav codes in a separat

Getting the start of the day in a different timezone

I have a Date. It is in the local timezone. I want a new Date that is at the beginning of the dayin a different timezone. Here are some things I do not want: A

A discord bot activating another bot via /commands or detect user who used a bot command

Ok, so Im trying to do the following rn: Im using the Disboard bot and beforehand rewarded users for bumping. That wasnt a problem, because the command was "!d

Change disabled value in HTML document, if option element have specific value

I want if test2 is selected from <option> then disable all element inputs by via id element1. I try with if but dosnt work for me function myFunction(

Why don't my class styles apply to dynamically created elements? Angularjs

My question is simple; why don't my class styles apply to dynamically created elements? I am creating a search bar here where I generate an li per matching resu

How to access the class itself from within a class without using its name [duplicate]

Is it possible to access the class itself inside of a classes function: class MyClass { static get myFunction() { return "foo"; } const

Return React component as object value and bind props to it

There's one global hook which returns react components when used: const { SomeComponent1, SomeComponent2 } = useHook({ prop1, prop2 }) How do I pass props to

javascript wait until variable is set [duplicate]

Can you make a function wait until a variable is set by another function? This is my example: function setvar(){ //some process that may take

Mutiple iterators in for loop Java not working properly

I am trying to pass a Javascript code to Java, but I've got a problem with the for loop, I have a for with 2 iterators in my Javascript code, and it is working

Replace nested array for new array

I have an array inside another array: Structure: First Array [ { Second Array [ { } ] } ] So I want to replace all Second Array for new array t

login with email or phone or username in node js

How can I login email or phone or username with password in node js and mongodb? user can login with email and password, username and password, phone and passwo

handle multiple checkboxes and complex data structure (reactjs)

Since I am pretty new to React and also not a huge expert on JS especially ES6, I wonder how to make my code (that works) prettier and refactor it. I want to h

Property 'current' does not exist on type '[boolean, Dispatch<SetStateAction<boolean>>]'.ts(2339)

I am adding cursor animations to a React/Typescript project and in researching came across a CodePen (Animated Cursor React Component) that works perfectly well

Can you print a page in a function being defined in javascript?

I have (had 2 years ago lol) been working on a web page that prints everything on it, and need to define a function that gets a value, replaces the text box wit

Why local file is showing corrupted after downloading using javascript?

Good Afternoon, Scenario: I am having pdf's file on local system and when user click the button, I want it to get downloaded. But after getting download the fil

angular audio play on ngoninit not working

html code: <audio id="notification" src="../assets/audio/notification.mp3" autoplay="true" muted="muted"></audio> ts code: let audioPlayer = <H