Category "javascript"

How to get unique client/device id

How to identify user of my website in IP non-based way? I'm looking for something like fingerprint2.js, but user identity should be the same no matter if user c

AWS Lambda@Edge 502 LambdaValidationError in CloudFront for redirect

I have a lambda function which performs 301 redirect if it has uri that is generated using regex. const redirects = { xyz: '/contact', abc: '/about', };

Custom Text in a href

Can someone help me how i can manage to support this to work with translation text option. <a href="{{url('account/my-review/delete/'.$value->id)}}"

How to get checked State in functional child component

I'm struggling with a simple problem in ReactJS. I'll have two functional components one parent component (list with elements of child) and one child component

Render between start and stop button in React Native

I wanna render between displaying a start and stop button based on pressing the buttons. That means if the start button gets pressed the stop button should be s

cannot call googleapis library inside html

I've been trying to call a simple function (uploadFile(test.txt)) inside an html but I can not call neither my app.js or googleapis library node.js gives this e

React-Tooltip not displaying until page is refreshed

Bit of a weird one here. My website is virtually done, there is just one issue. I've implemented tooltips, but they only display once I refresh the page! Here i

Variable not displaying on Screen

I've set condition for when a user enters numbers into a text box depending on what the numbers entered start with on screen it should display the name of the c

How to write custom select/checkmark logic for material-table, to include selected rows inside of detail panel nested material-table

I have a material-table component where I am rendering a nested materiel-table in the detail panel of each row. I would like to know if there is a way to includ

how to create a user in postgres to connect to nodejs?

It is my first time using postgres and I am trying to use it with node. I installed postgres in Ubuntu and created the user admin sudo -i -u postgres createuser

How to make an arrow function in react so that it executes only once and saves the data in sessionStorage

I am developing an application in react.js and I need to implement a request to Active directory to extract the information of the logged in user, through Micro

Javascript method to capitalize the first letter of every word and also every word after hyphen or dash

I need a JavaScript method to allows me to convert the first letter of every word in a string to a capital letter like this: mike tyson wayne to Mike Tyson Wayn

Chromium bug when input has focus and affects hyperlink text font weight on black background

I found a slight glitch in the hyperlink anchor tag text block. When you have a black background and have focus on an input and a hyperlink to the right or unde

Typescript error TS2583 Cannot find name 'Set'

I have just started learning Typescript today and when I run tsc app.ts I get 11 errors but I thought I would start with the first. Tried updating tsconfig.json

How to calculate window width based on getBoundingClientRectAsync values of another element?

Is it possible to calculate viewport or window width based on getBoundingClientRectAsync values of element which is in virtual DOM? Running JS in web worker (am

React webpage refreshing every 4-6 seconds

I'm not really sure even what part of my code to show because it's such a general error, but everytime I npm start my React webpage it automatically goes from t

How to download CSV from a nested object in javascript?

I want to iterate over an object in Javascript and create a CSV file from its internal objects. const list = { "right": { "label": "Right",

Objects and comparing in Javascript, how to pass the value into the method

I got this Javascript exercise. I couldn't figure out how to pass the value of the pay of each person into the "comparePay" method. I'd be glad if you help me t

How to target props of a component already nested inside another component

I am trying to render a different component in my App.js based on an OnClick placed in a button nested inside my Home component. Essentially I want the Home com

Javascript: Cypress: select sample with not contain value

I want to select a random value from a dropdown, with the restriction that a specific value should not be selected. const initialOrderReason = cy.xpath("//t