Category "javascript"

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)

Parsley + recaptcha v3 promise

I'm not able to get the following code to work: $(function() { function verifyRecaptcha() { return new Promise((resolve, reject) => {

react merging two components and sorting data by date and time (newest at top oldest and bottom)

I have codes below code removed The problem is it prints rows of expenses and then rows of incomes (i.e posts from expenses are printed first then after them i

swapping array elements without a temporary variable

The following code: var words = ['javascript', 'hmtl', 'css', 'python']; words[0] = words[3]; words[3] = words[0]; alert(words); ...gives