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

Node.js: how to deal with getFullYear in pug

I am trying to get the lifeSpan by subtracting dateOfBirth from dateOfDeath. getFullYear() is returning the year in console. But, in pug.. it is throwing error as follows: Cannot read property...

View Article


Focusing on inputs in divs, using arrow keys (no jQuery)

I have three div elements, with text inputs inside. I need to make it possible to be able to navigate between parent divs to focus on child inputs, while using arrow keys (to go back and forth from one...

View Article


CSS transition wont start on blur screen

I'm using react js. I try to run the simple code:setTimeout(() => { setTimeout(() => { const element = document.getElementById(‘circle’) element.style.backgroundColor = ‘red’ }, 3000) }, 3000)...

View Article

Ajax form duplicating when submitted

So I'm trying to create a chat application and I know people already asked this question but it doesn't seem to fix my problem.I've already tried to add a beforeSend function but that doesn't seem to...

View Article

The toogle js class not changing the Icon

I have tried this toggle js to change the icon on click but its not happening. What am I doing wrong here.Here's the html<div class="south-search-form"> <form action="#" method="post">...

View Article


Geocode Service Request JavaScriipt

Im begginer with JS and im confused with all of these tutorials i have seen about my problem and i dont know how to solve it. So I need to check if the city input from user is valid via nominatim OSM...

View Article

Load JSONs recursively in node.js and typescript and parse them

I have the following structure--- Folder - Sub-folder -1a.json -1b.json - Sub-folder -2a.json - Sub-folder - more JSONS here - something.tsI want to write a function that takes "Folder" and recursively...

View Article

Crawling problem with Nightmare.js & Recursivity

Hello I am beginner with Javascript and Node.js and I would to make some crawling with Nightmare.js... I want Nightmare crawling page to page and get some data. I tried with recursivity paradigm and...

View Article


value of using React.forwardRef vs custom ref prop

I see that React.forwardRef seems to be the sanctioned way of passing a ref to a child functional component, from the react docs:const FancyButton = React.forwardRef((props, ref) => ( <button...

View Article


Using mongoose promises with async/await

I'm trying to get the hang of using Mongoose promises with the async/await functionality of Node.js. When my function printEmployees is called I want to save the list of employees which are queried by...

View Article

Javascript imports / exports CORS problem

I need to create an instance of classes from a certain javascript file which contains 3 classes and call the methods of that classes from another javascript file. Classes in main javascript file is...

View Article

Call parent componentWillUnmount after child componentWillUnmount

If i have two components "A" and "B". And "A" renders "B". the componentWillUnmount of "A" will called before componentWillUnmount of "B". Is it a good way to put settimeout of 0 ms in...

View Article

How to group objects in an array based on a common property into an array of...

I'm trying to group objects that have the same property together. I'm starting with an array of objects, and I want to end up with an array that contains several arrays each with the objects that share...

View Article


How to fetch firebase data by child of child in javascript

enter image description here in the above image locations data keeps added every day datewise, within that date we have a list of employee IDs like (1,174), employee id also keeps changes when he login...

View Article

Firebase functions: set region when using reserved hosting urls

I currently have my firebase setup like this (without a config, as the reserved hosting urls load the config automatically):var functions = firebase.functions(); if(window.location.hostname ===...

View Article


How to download video with JavaScript

I am working on video downloader extension for Google Chrome, and it is my first project (I am making Chrome extension for the first time). As I know you should use JavaScript for functionality of...

View Article

Getting the error Attempted to assign to readonly property - When scrolling down

I'm trying to create an effect, wich a. changes the color of an svg path and the toggle button to black when the screen is below 800 (the initial state is white) and b. changes it back to white when...

View Article


msg object is not readable info

Good day people of Stackoverflow...I have a serious problem with the info I`m reading of my weather API.I get info into a function node that exports the sunset and sunrise times, now the problem is...

View Article

Cannot read property 'length' of undefined at wheelnav.createWhee

I have some problems with Wheelnav.js When I include the scripts inside my html file, chrome shows this error:Uncaught TypeError: Cannot read property 'length' of undefined at wheelnav.createWheel...

View Article

I cannot manipulate CSS display property with JS?

I'm trying to set the display value of a modal to block after clicking to the call button. I couldn't figure out why the JS sheet couldn't change it even if I double-checked (What I mean is to check...

View Article
Browsing all 140071 articles
Browse latest View live


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