Category "javascript"

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

How to use Zabbix's CurlHttpRequest() in JavaScript?

I am learning Zabbix. I would like to use CurlHttpRequest() and all these functions: I can't find the documentation (what's going on inside). I would like to r

Twilio Screen Share - Microphone on macos

I follow up the below link to add screen share functionality in my app. https://www.twilio.com/blog/screen-sharing-javascript-twilio-programmable-video But when

How to read gamepad values in the playstation browser using usb, bluetooth or gamepad api?

I tried connecting the gamepad with the ps browser, but the browser gives me an error, that navigator.bluetooth and navigator.usb are undefined. It's easier to

getResult is Undefined

I can't seem to find out what is creating this undefined error in my basic rock paper scissor game it gives me to results instead of just one I'm trying to unde

How do I make puppeteer select google translate text box for me? it only works if I click it myself

my code is as follows await page.waitForTimeout(1000); await page.waitForSelector( "#yDmH0d > c-wiz > div > div.WFnNle > c-wiz > div.OlSOob

how to run javascript function in selenuim

how i can run this js code in selenuim window.hcaptcha.render = (container, params) => { console.log(container) console.log(params) window.hcaptchaCallback =