Category "javascript"

Access token missing from Keycloak context

I am trying to make an authenticated request from postman to my node, apollo, express backend. I am gettting an error saying that the user is unauthenticated. W

Getting hidden values on returned ajax results [closed]

I have a shipping estimator I am trying to reset via ajax on any cart change. I have the call and ajax working well on all of the page except

Remove Klarna Payments with cash on delivery method

I have a problem with a code. So I have five different payment methods in my site. When a customer select "Cash on delivery" as shipment method all the payment

Question for auto-resizing Textarea using VueJS

I'm trying to let the text area automatically adjust its height when the text value changes: <textarea ref="textarea" v-model="message"> </textarea>

How to make a button event handler in discord.js V.13

I create a function to send an embed message with a button and now I would like to create an event handler to detect when the button is clicked and execute a fu

ScriptUI - Integer number in slider percentage

I have a script that shows a dialog window with a slider bar, next to a static text. The text shows the percentage of the slider bar (0 to 100). The problem is

Using Shopify JS Buy SDK, unable to remove variant item from cart

I have a button to remove an item from the cart on my cart page, but I'm receiving this error: Variable $lineItemIds of type [ID!]! was provided invalid value.

NextJS fetching nested array of objects from MongoDB using mongoose and getServerSideProps

I'm trying to fetch an array of objects from MongoDB, using mongoose and SSP. One hitch is that all ObjectIds must be converted into strings. Currently I'm doin

Hardhat: ProviderError: The execution failed due to an exception

I'm deploying contracts with hardhat, but cannot use address type in contracts ProviderError: The execution failed due to an exception. at HttpProvider.requ

How to access document and element variable when using javscript kernel

When using the python3 kernel the following code works: %%js let b = document.createElement("b") b.textContent="Hi there!" element.append("A test:") element.app

How can I sort the order of links based on the user's number of clicks and save it to local storage using JavaScript?

I'm trying to add the feature to sort the order of links in a specific div based on the number of times a user clicked a link. It's to pin to top Favorite links

React Select Overlaps With Label

I am using react-select ^5.1.0 and my options and values are displayed well. I have a small issue when scrolling the options, a select word overlapps the option

Cannot read property of undefined data() Firebase

I'm trying to implement redux saga in my old project and i get strange error. I'm getting back the userData with all user details but my middleware logger tells

How does a JavaScript object have different keys and values when opened in the Firefox developer tools? [duplicate]

I am creating a deck of card objects in JavaScript. Why do all the objects hold the same keys and values? Here is my code for(

How to filter array of nested objects with unknown depth based on given search term

There are similar answers here but all of the ones I've seen and tested don't go pass two levels deep, so I don't think this is a duplicate problem...I am tryin

How to repeat event for every 2 weeks on multi selection days up to 3 Occurrence's

I'm working on a google calendar kind of repeat feature using angularjs/php. Trying repeat the event for every 2 weeks on multi selection of days and that even

How to repeat event for every 2 weeks on multi selection days upto 3 Occurances (times)

I want to repeat the event for every 2 weeks on multi selection days and that event will be repeat upto 3 occurances(times) from start date. tried below code. p

Yup validation for nested form elements in formik

I have a nested Formik form which has checkbox in every new set of form fields added. I am trying to add validation in Yup to achieve: Atleast one checkbox to b

How do I unsubscribe to the dispatch to grab new data onload on useEffect? - I'm using Redux Toolkit

I can load my data but only after I refresh the page. Until then, it shows the data from the previous item I clicked on. It's behaving like a cache would. Here

Destructuring Nested objects in javascript | Destructure second level parent and child Objects

I need to destructure and get values of title, child, childTitle from this object const obj1 = { title : 'foo', child : { title2 : 'bar' } } le