Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138134 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Customize grid lines in d3 bar chart

I am developing a two-way bar chart using d3. I want to add grid lines to the bar chart, how to customize those grid lines. I've used d3fc to draw the grid lines. It looks something like var x =...

View Article


How to set Acl for User class in cloud code using before save trigger?

Hello here is my cloud codeParse.Cloud.beforeSave(Parse.User,async (request)=>{ const user = request.object; const t = user.get('tProfile'); const s = user.get('sProfile'); if (!t && !s) {...

View Article


Is the target of MouseEvent always an Element?

Visual Studio Code shows that target variable is of EventTarget type in the following TypeScript code:document.addEventListener('click', (event) => { let target = event.target }) Why isn't it marked...

View Article

How to change the HTML type of a column using Javascript

There is 3 issues in my code: Infinite while loop I dont understand why, I'm just trying to test if the prompt is a number or not (If not -> Prompt again until it is) [SOLVED]If min/max are correct,...

View Article

Cordova not refresh index and auto reloading

I am having difficulty with cordova.At the start of the line Cordova run browser everything opens, but if I modify the files, at refresh of browser, they always remain the same.It is seen as: 304...

View Article


NuxtJs Cannot read property '_normalized' of undefined

this error show when I try to fetch some data in nuxtjsCannot read property '_normalized' of undefined This is my axios request in nuxtjs : async asyncData({app}){ var response = await...

View Article

Image may be NSFW.
Clik here to view.

How to replace file extension name in reactjs

how to replace a file name and extension in react.js public folder.convert to index.html to index.php**

View Article

Remember GPS permission state

I'm working with GPS location function and the problem is that the permission popup is coming over and over again (each new url refresh / F5 key press).How can I remember the state that the user has...

View Article


How to break on reduce method

How can I break the iteration on reduce method?forfor (var i = Things.length - 1; i >= 0; i--) { if(Things[i] <= 0){ break; } }; reduceThings.reduce(function(memo, current){ if(current <= 0){...

View Article


React textarea loses focus unexpectedly

I've created a Row and a Col components for an Card in Accordion using Bootstrap - simple, not React.Bootstrap or whatever. Row and Col just show their children, the Card just has more props and also...

View Article

Print button in webview

I have web mobile application, at the button in aspx page i put the below code to print the page, it is working fine in browsers (all) but when i put my application inside webview in android it not...

View Article

Copy text to clipboard when a Chrome extension’s browser action is clicked

I want clicking my Chrome extension’s browser action button to copy some text, but the methods used on websites don’t work.(I realize there are some similar questions, however they answer copying text...

View Article

Image may be NSFW.
Clik here to view.

Why is an empty array being passed as a parameter to .reduce?

I was reading the developer docs here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceI just wonder why there is an empty array being passed where you...

View Article


how to get diffrence day between two days in angularJs at form of (yyyy-mm-dd)

I have tow days YYYY-MM-DD like (2020-02-21) one is the current day and the other is a day from my server at a from (dd-mm-yy) like (21-02-2020) then guys I need to get how many days between those 2.

View Article

useState hook - state gets lost i.e. resets to initial value

I am trying to initialize the state during the mounting cycle, and then do something with it on each update. However, the state gets reset somehow? I don't understand why.const [journalItems,...

View Article


Image may be NSFW.
Clik here to view.

Show a Reactjs component within a .map function by assigning it an id

When I click on a button within a .map function, I just want it to be displayed the component that I clicked on, i do not to want repeated in all the others. In this moment the behavior of the...

View Article

Not able to generate the pre signed url for aws s3

Im using the following code to generate the pre-signed url using aws sdk in javascript.const aws = require("aws-sdk"); const s3 = new aws.S3(); AWS.config.update({ accessKeyId: "generated access key",...

View Article


react redux awaiting state change so i can map

I'm trying Redux for the first time where I've been previously using React and its component state system. My code below works 100% in its vanilla react component state but its not working as it should...

View Article

How can I get JQuery to replace the non URL parts of the string when fetching...

I have this code which extracts the element for the background image, however it pulls in the " url'" parts of the code too. I just need the actual image addressI have tried to use the replace function...

View Article

Component does not render after state change

My child component is a HighchartsReactNative component RatingsChart which derives its props from its parent. The code is like this:import React, { Component } from 'react'; import...

View Article
Browsing all 138134 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>