Category "javascript"

Delete a word from a string which contains hashtags

I have already done a lot of "filtering" with regexp to remove unwanted characters from a string, this is what i am using: var regexpHashtag = new RegExp(/(?:^|

React Native - TypeError: n.createContext is not a function. (In 'n.createContext(o.default)', 'n.createContext' is undefined)

I'm trying to implement React Native into an existing Android application. I follow the steps in the official documentation and I have ended with the following

My pages in PBI report is opening on new tab when clicked but I want to restrict this behavior

I have created my application in REACT.js and I have embeded my PBI reports into my application. Whenever I am clicking on the button in my PBI report, I am be

In chrome website rendering in iframe with different domain is unable to set and get cookies

Website a.com is rendering b.com in iframe. When running website b.com alone, everything is working fine. But when running a.com, website b.com is unable to set

How to save activities for user HTML/JavaScript/jQuery

I made favorite buttons and if user clicks on it, it will save specific favorited item to a different page with LocalStorage. Code works perfectly but now I wan

How Can I make onclick event on a li with pseudo-element ::before

I have created a Timeline using and elements. The result looks like that: I need to click on the second circle and automatically the line that is between f

mediaDevices.enumerateDevices() returns empty deviceId even after getting permissions

The problem I have has been discussed in several questions on this site: When I call mediaDevices.enumerateDevices(), the field deviceId is empty. The best ques

how to increment the url onclick of button next

I have url for page 1 as http://www.dev-crn.com:5703/tag/Cloud on click of button next i need the url updated for page 2 as http://www.dev-crn.com:5703/tag/Clo

How to change color of a select on keypress

I am trying to create a form. I am using a <datalist> tag as well as an <input> tag, so that a user can also type an option or just select an option

Non editable content allowed to delete. How to restrict this?

We have used the TinyMCE editor with "non editable" plugin. we tried to delete the non editable content, it is deleted. How to restrict the delete(delete/backsp

Sort array of objects by string property value

I have an array of JavaScript objects: var objs = [ { first_nom: 'Lazslo', last_nom: 'Jamf' }, { first_nom: 'Pig', last_nom: 'Bodine' },

Webpack: How to export directly to global (without .default) containing stylesheet imports?

Context I have a webpack.config.js like this: /* Something here */ module.exports = { entry: { main: './src/index.js' }, output: { library: 'MyCl

not getting data when using SWR and context API in Nextjs

am trying to see the data am that am get from an API using SWR and also setting the currency in the API to what ever the user is using through context API but i

Randomising env for tests in Lambdatest

I'm wondering how can I set up my LambdaTest config so it runs each scenario in a different env. At the moment my setup is Windows - Chrome v88.0 and the config

Image modals on multi-tab page

I want to create a multi-tabs page with an image modal on each tab. I used code from w3school.com. The modal only shows on the first page but not in the others.

Postgresql req.query returning everything instead of what is being queried?

My getByTitle query doesnt seem to work, all my other routes and models work perfectly using params. Not sure what it is I've written wrong? For context this is

Difference between centroid and centerOfMass in turf

I need to find the geospatial coordinates of point which is the mean of the distances between all the Features in my GeoJSON dataset. In turf.js both centroid a

How to create two Instances of the Simple Ajax Uploader Dropzone in One Project but in different modals

Two things not working: During Upload Progress Bar is not Working Implementation of this code in two different Bootstrap Modals but working separately and Indep

Check if an array includes an array in javascript

The javascript includes function can be used to find if an element is present in an array. Take the following example: var arr = ['hello', 2, 4, [1, 2]]; c

NPM CI error bindings not accessible from watchpack-chokidar2:fsevents

When I run npm ci on Github Actions I got the error: Run npm ci npm ERR! bindings not accessible from watchpack-chokidar2:fsevents npm ERR! A complete log of t