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

getElementById has null value when DOM should be loaded

I'm using document.getElementById("statsInputMonth").innerHTML to set the value of a span tag to the innerHTML of another element. I've done this plenty of times earlier in the code, but when I do it...

View Article


Passing multiple actions to onClick event in a react-bootstrap Button

Consider a react/redux application with react-bootstrap components.This may be a very rookie question, but I am trying to pass multiple actions to a single onClick event on a Button from a...

View Article


Can't sort array containing int

I'm unable to sort an array containing int. Here's my code for the sort :var asr = []; function sortNumber(a, b) { return b - a; } asr.sort(sortNumber); The function sort doesn't do anything, here is a...

View Article

Cannot mock "window" with jasmine/karma and typescpript

I am trying to mock "window" object in the jasmine/karma unit tests. I've tried almost all solutions and anything didn't help me.The simpliest:const mockWindow: any = () => { return { navigator: {...

View Article

"No overload matches this call" for removeEventListener and addEventListener

I have a keydown handler function defined like so: handleOnKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => { if (key.isEscape(e.key)) { stopEvent(e); this.props.handleClose(e); } }...

View Article


create-react-app doesn't work with proxy

I use create-react-app to bootstrap my react app, I did this in my package.json "proxy":"http://localhost:3001" because my api server is running on 3001, but I fire request using axios, it still point...

View Article

Nodejs with sequelize Returns Error Running Update

I have this update function in user controller: async update(req, res) { const schema = Yup.object().shape({ name: Yup.string().required(), email: Yup.string().email(), oldPassword:...

View Article

sheetJs - no output for empty cell

I am using sheetjs. The empty cell is not getting populated in the json object including the header. I need that information also if a column is not entered. Here is my...

View Article


Get a specific HTML page by clicking a button? (HTML/JavaScript)

Ok,Thats my first question on this website, and my english is not the best so before im sorry. :DHello, I want to program a quiz, so that it does not get boring, there should always be new pages with...

View Article


TypeScript Parameter Defintion Overrides

I am using @types/react-simple-maps, and in one of their type definitions:interface GeographiesChildrenArgument { geographies: object[]; path: GeoPath; projection: GeoProjection; } they use...

View Article

Image may be NSFW.
Clik here to view.

Nodejs: How to prepare code for production environment

I'm a beginner developing with Nodejs and React. Right now, I've got a first version of my web application which works correctly in development environment, but I'm trying to build a version for...

View Article

Resizing object called from using string containing JS variable

I am trying to use JavaScript to pick a random row from a table in a Google Sheet, then display it on an HTML page. So far I have managed to get the random row to display as an object, but I can't...

View Article

Android Smartbanner positioning

I am using this Script for adding the Android Smartbanner for linking my App: https://github.com/ain/smartbanner.jsMy Site is ismoker.euHow can I put the Android Banner in the same way to the top of...

View Article


Why is a property empty when I access the property but the property is shows...

This question already has an answer here:Can't access object property, even though it shows up in a console log 25 answersIs Chrome's JavaScript console lazy about evaluating arrays? 6 answersI have an...

View Article

Cant use @click="somefunction()" on a vs-dropdown

As the title says, I'm unable to use the @click function in a vs-dropdown<vs-dropdown> <a href="#" @click="funct('/parameter')">Home</a> <vs-dropdown-menu>...

View Article


Node.js passport OAuth 2.0 authentication: where to store access and refresh...

When using passport in a node.js app as authentication middleware for Oauth 2.0 flows (such as Facebook, Twitter, etc..) I would like to know what are the common/best practices to store access tokens...

View Article

Image may be NSFW.
Clik here to view.

jqgrid export not exporting right data

when I export jqgrid to excel, I am not getting expected result. I am getting right data for two columns and for the rest columns it says undefined, also I am getting two extra columns at the end...

View Article


Hide element if no search results displayed

I'm trying to hide an element (no-results-wrapper) if there are no search results displayed. My goal is that when you first open the search bar this element will display, and if there are no search...

View Article

Creating a map with random points website [closed]

I want to create a webpage where the background is like an xy plane and then i could generate random small circles/some shape and they would appear on that webpage - and as times goes by it keeps...

View Article

How to implement socket.io listener for mongoDB document and push to client

this socket.io instance pushes messages of a specific document in a mongodb collection to two chat-users. Now I would like to listen to the array I have defined with findOne and push the result, if...

View Article
Browsing all 141722 articles
Browse latest View live


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