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

Argument of function is a property that exists in a type of Typescript

I want to write a function that returns a single property that exists on a type:type CustomType = { property1: boolean; property2: numeric; }; private getData(obj): CustomType { // do stuff return...

View Article


How can I get the string value of a key for a JavaScript object?

First of all, I don't want the index or any value in the object. I've used a function to group these elements from a json file. When displaying them on the page, I want a section heading that displays...

View Article


Why am I getting ERROR TypeError: "xyz" is not a function?

I have the following code:MatchComponentimport { AllData } from './../../data-handling/all.data'; import { MatchService } from '../../data-handling/match.service'; import { Component, OnInit, Pipe,...

View Article

Google cloud function sometimes works and sometimes not

I'm using a onCreate function for Firestore to detect user signup and create a document using his user id. The problem is the function works sometimes and doesn't work other times. Also, I'm getting a...

View Article

How can I import Jquery into React

I have to do an animation, so I thought I would use what I know - Jquery;I tried copying and pasting the uncompressed version from their website into a new file and importing it with: import...

View Article


Can't install Strongloop for Loopback v.3 on MacOS Catalina

I'm trying to learn about Loopback v3 (which is what they are using on a job site where I'm working), and I'm trying to follow their tutorials. One of the steps is to install Strongloopnpm i -g...

View Article

How do I speed up Dark mode delay on website?

I would like to speed up dark mode taking effect on my website. When I load a page currently there is a delay between the page loading and dark mode taking effect. Here is my jQuery.js codeonload =...

View Article

Contact form Phone Number format Javascript

This piece of code lets me write a phone number to my contact form as (XXX) XXX-XXXX format. (working example is at https://www.fxmerkezi.com/ucretsiz-danismanlik/)But I need it to be done like...

View Article


Close dropdown when clicking outside the dropdown list with custom directive...

Im having problem on how to make a clean code regarding to closing a dropdown menu when clicking outside the popup. dropdown.directive.ts import {Directive, HostBinding, HostListener} from...

View Article


using image resize library imagemin in vuejs throws error Cannot read...

i'm trying to use the image resize library imagemin in vue.js but it's throwing me this error after i installed imagemin-mozjpeg. i have not started using it just importing it throws error. this is the...

View Article

Call function from JavaScript module in HTML

Say, I have the following JavaScript module using Vue:import Vue from "./vue/vue.esm.browser.js"; const app = new Vue({ el: '#app', data: { message: 'Hello, world!', } }); // Custom function for...

View Article

Service Worker: Append header to requests for CSS & JS files

I've been trying to use service workers for (what seems like hours & hours), to attach a simple header to all requests. Whats frustrating is, it sort of works. Attempt...

View Article

React - Checkbox select all

I've got a list of items, each with their own checkboxes and I've decided to try add a 'select all' checkbox to make it easier for the user to select them all at once.Unfortunately I'm finding it hard...

View Article


Live Search JSON Data Using Ajax jQuery not work?

My code not working. This is my files. It's work but not view the list and error in Json file.I don't know why?? You can will see error in the ConsoleIt's my Json file inner:data.json[ { "name":"Angel...

View Article

Image may be NSFW.
Clik here to view.

slideToggle activate when page load

Please, can you help me with my code.First, I managed to call dropdown option from URL// Relinquish control of `$` to previous library jQuery.noConflict(); // Wrap jQuery code in IIFE (function($) {...

View Article


Array.filter duplicates when returned variable changes [duplicate]

This question already has an answer here:What is the most efficient way to deep clone an object in JavaScript? 69 answersNote: I am using react, hence please consider the family array as...

View Article

Why is "error empty response' after fetch request?

My project is bundled on webpack. I've a form which post data to other local server, where saving in txt file. All is okay, data saves correctly, but after a few minutes, on client returns alert...

View Article


Dynamic input fields in a table React JS

I'm trying to add dynamic fields to a react JS table, the table gets a new row every time user selects a product from the dropdown, the row must then have three dynamic input fields, i am not able to...

View Article

Dynamically use [lng].js in React component

I'm creating a node module for React just to try myself out and learn more. But I'm facing a problem. I want to make this module without any dependencies (except React) but I also want to have I18n in...

View Article

Changing the url of an Ajax request dynamically

I have an ordinary Datatables in my web page, it looks like this:$(document).ready(function() { var table = $('#mydb').DataTable({ "serverSide": true, "ajax": "/myapi/?item=free&format=datatables",...

View Article
Browsing all 140220 articles
Browse latest View live


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