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

How to stop Google form onSubmit trigger from running twice?

I have about 10 Google Scripts that send emails out when a form is submitted. It was working fine until recently, but suddenly all of them have started sending out two emails for any form submit. I've...

View Article


Style and js doesn't work after changing project entry point to public folder

The project was working fine till i moved index.php from project root to public folder then moved css and js from public to assets folder here is how my project looks like nowpublic index.phpassets css...

View Article


How can I create routes depending on user type?

I'm building web application which has 3 types of users.Guest UserRegistered UserAdmin / Super UserWhen User logged in I'm setting localstorage with usertype:Both User and Super user have different...

View Article

JavaScript selectionchange event for a particular element only

I want to implement a JavaScrit selectionchange event on a particular div element, so if the user selects text from the DOM I want to show a highlighter box. I have implemented this for web with an...

View Article

addEventListener to an element in a array doesn't set the expected value in...

This question already has an answer here:JavaScript closure inside loops – simple practical example 44 answersI have been trying to create a menu for emojis in my html file. I am importing data from a...

View Article


Converting string to function name

Learning React Native. Trying to convert a string into a function name. Getting an error saying "func is not a function. func is undefined". Need some help please. The end objective is to create a view...

View Article

Drop down not expanding on click

I am using react-dropdown to create a dropdown for my page. The component is as follows : <Dropdown options={options} onChange={this.handleDropdownChange} placeholder="Select an option" />...

View Article

Ajax: Function specified in route is not called

I have a button that when you click it, it will show a confirmation box. If the user clicks 'ok', the word 'reached' would display inside of the div named 'EventData'.So far the confirmation box shows...

View Article


Image may be NSFW.
Clik here to view.

Convert array data into a string - reactjs

I have an array with several objects in it. To show you the structure of the array it is like this 0: {lat: "7.9511758", lon: "80.7426426"} 1: {lat: "6.9566662", lon: "80.7608237"} 2: {lat:...

View Article


Image may be NSFW.
Clik here to view.

How to set default image before upload using Croppie library?

I'm using Croppie to crop and upload images. Everything works fine except I can't set default image before uploading. I would appreciate if anyone helps:Here is my javascript code:function demoUpload()...

View Article

Coinmarketcap giving #N/A and Loading.. errors when pulling prices. Could it...

Until about a week ago, my Google sheets code was pulling coinmarketcap prices with no issue. This then randomly stopped and has been showing an error; either #N/A or Loading.. When hovered over the...

View Article

How to create a reset button in a JS game?

I almost finished my first JS game ( rock, paper , scissors) and I'm struggling to create a reset button that just takes the scores and the number of the rounds to 0. Initially I thought that I solved...

View Article

How to remove an object of an array in javascript by checking checkbox

I have two inputs by type checkbox :<input type="checkbox" value="5da1dc651d011c56ef1cb3db_693715" onchange="handleChange(this)"> <input type="checkbox" value="6da1dc651d011c56ef1cb3db_837154"...

View Article


Image may be NSFW.
Clik here to view.

Populate a DataTable with MySQL Database

I’m trying to build a CRUD application. I have a MySQL database of a large amount of records and would like to use a JQuery DataTable rather than trying to code out a table from scratch. The problem I...

View Article

How to move cursor up, down, left, right in textarea on button press using...

How can I make buttons to move cursor up, down, left or right in a textarea using jQuery?$(document).ready(function() { var clpBrd; $("textarea")[0].focus(); /*To show to cursor at the end of text*/...

View Article


Detecting WebP support

How can I detect support for WebP via Javascript? I'd like to use feature detection rather than browser detection if possible, but I can't find a way to do so. Modernizr (www.modernizr.com) doesn't...

View Article

How to pass the disabled condition, in the ionic button component

I have the following component:import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'app-button', styleUrls: ['./button.component.scss'], template: `...

View Article


how to fix Objects are not valid as a React child object promise

I create an eLearning app using react and want to split routes to many users (pupils, teachers, and admins) so I use this methodNewRoute.jsconst NewRoute = ({ component: Component, type: type, ...rest...

View Article

How to count digits of given number?

I want the user to enter a number and print back the amount of digits of that number.I know that I can use length, but my homework asking for while loop.This is what I have so far:var num; var count =...

View Article

Determine the distance between a straight line and a curve line drawn in a...

I have a program in HTML, CSS and JavaScript where one can draw a from an initial point (Mousedown event )curved line(Mousemove event) and a straight line when the mouse click is lifted up(MouseUp...

View Article
Browsing all 138163 articles
Browse latest View live


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