Category "javascript"

How to user filter with Firestore database in React Native?

I want to filter the firestore query to get all docs that do not contain a specific value. I used @react-native-firebase import firestore from '@react-native-fi

How do I upload a webcam image using JavaScript ajax to a Django site?

I am creating a livestreaming site using Django and I need to upload an image using an ajax post request to a model form on the django site. I am working with t

res.send return two or more items from a map method

I'm doing a get request and it fetches properly. From there I have to return that data based on the if statement, but the data needs to be returned as an object

How to use localStorage across web pages

Well, I'm trying to integrate two web pages (index.html and comunidade.html), where the first one is a form where you input some data and the second one is the

Angular Ag-Grid row group empty render when querying DOM elements with angular-testing-library

I have an ag-grid that contains different columns and column groups, as well as row groups. I am trying to test the DOM elements displayed in the row group usin

what are data-* HTML attributes?

I've recently found on one of the sites opening tag like this: <script data-ip="93.1xx.3.2x" data-backuri="something.com"> And I couldn't find any info

state is not getting updated for a new user in react native

My app has a test sheet, if a user passes the test he is shown a passing screen and then the state is saved using asyncstorage. But the problem here is, let's s

Echarts multicolored line chart

Is it possible to make echarts line chart with 1 line painted in different colors? For example if value <= 0 the color is red, if > 0 the color is green?

Display Leaflet marker using latitude and longitude from XAMPP database using Laravel framework

I need help with this problem since I tried quite a few tutorials and videos, but I still can't implement them. The homepage of my website including the Leaflet

TypeError: Cannot read properties of undefined (reading 'createdTimestamp') discord.js

Basically i am trying to create a userinfo command for discord.js, i followed some tutorials and i seemed to make one, but i get this error saying: TypeError: C

how can i show a different window depending on the option i choose from a selection combo?

I have this code And I want to show a different message when I click in one of these options. document.getElementById("specialityAppointmentSelection").

Javascript VSCode function definition broken with module exports

I'm working on a Chrome extension and have a set of js files imported in the extension's popup in <script defer src="../utils/X.js"></script> tags.

Angular not passing object to html page

I am having issues with learning angular, I didn't use to have these problems before, but now when I do these demos things work great until I switch from using

Angular - Async pipe in ngIf and text binding will not display first emitted value

I have very simple component template: <button (click)="emitNextValue()">Next Value</button> <p *ngIf="text$ | async"> {{ text$ | async }}

Parsing Javascript cookie values and separating values

I'm still learning Javascript and I'm trying to parse a value from a cookie in a specific key: I'm using this current line: const cookieObj = new URLSearchParam

Mixing functions and const/let inside conditional statements cause ReferenceError in Safari

We have something like this if(true) { const a = 1; function myFunc() { alert(a); } myFunc(); } In Safari 11 this cause "ReferenceErro

Chrome browser can not read source map its from Express socket.io

My problem is : DevTools failed to load source map: Could not load content for chrome-extension://flijfnhifgdcbhglkneplegafminjnhn/content/socket.io.js.map: Sys

useContext gives App.js:24 Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

I am using an Auth Context Provider in my App, which is initialised in this file: authState.js import React, { useReducer, createContext, useContext } from "rea

how to add a new item inside an object

react I have that problem. I cant add a new item inside an object const person = { name:"farhan", age:"25", address:"daka" }; person.push({professi

Want to run js in loop [closed]

var pause = document.querySelector(".pause1"); var audio = document.querySelector(".audio1"); function togglePlay() { if (audio.paused)