Questions tagged [javascript]
For questions about programming in ECMAScript (JavaScript/JS) and its different dialects/implementations (except for ActionScript). Note that JavaScript is NOT Java. Include all tags that are relevant to your question: e.g., [node.js], [jQuery], [JSON], [ReactJS], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript
987
questions
0
votes
0
answers
14
views
Does Date object in browser update timezone correctly after changing system timezone frequently on Ubuntu?
I am encountering an issue where the browser timezone information becomes incorrect after changing the system timezone multiple times on my Ubuntu PC. Specifically, the Date object in my browser ...
0
votes
0
answers
39
views
Cancel function
I have a component on the search page, and inside the component, there is a useEffect that triggers the post filtering and fetching code from the database when the search words (city, word in post, ...
-1
votes
2
answers
32
views
Is there a way to select all elements of class ("btn") whose parents are of class ("seat") using javaScript and change it's background color?
I am trying to implement a bus seat layout. I want seats to change it's background color when clicked. The seats are bootstrap radio buttons with class='seat' and labels with class='btn'.
I have tried ...
0
votes
2
answers
37
views
Unable to add request-header to POST request [duplicate]
I am hitting the API by using payload and in headers giving Content-Type : 'application/json' still in browser in request headers I'm seeing Content-Type : 'text/plain'
Because of that in the backend ...
2
votes
0
answers
31
views
Detecting CSS @scope support with JavaScript
Is there a way to detect @scope support via JavaScript?
I've tried: CSS.supports('@scope') or CSS.supports(':scope') but both of those are returning false in browsers that do support it.
I tried CSS....
0
votes
1
answer
34
views
Display an Alert When User Session Expires in Laravel
I am using the Laravel framework and would like to create an alert when the session expires. I tried implementing a JavaScript code that checks if the user is logged in every three seconds as follows:
...
0
votes
0
answers
32
views
Html not loaded even after window.addEventListener('load', do_something) is invoked
I'm working on a browser extension that scrapes data from a webpage. I've added a method to scrape data, which is invoked via a load listener:
window.addEventListener('load', scrapeSomething)
However, ...
0
votes
0
answers
5
views
Jest - react-native-color-matrix-image-filters/dist/CMIFColorMatrixImageFilterNativeComponent.js: Could not find component config for native component
I have a React Native Android project and I just upgraded the react-native version from 0.72.3 to 0.74.3. After a fair amount of library upgrading, TS and Lint fixes, etc I was able to get my ...
-3
votes
0
answers
25
views
Stripe Connect Payouts API [closed]
I am creating an application in which users can add their bank accounts in the application and from admin side I want to send the payouts to their bank accounts. I am using Node.js and Stripe.js (In ...
-1
votes
0
answers
15
views
req.headers.authorization is undefined
So I've been trying to implement JWT authorization for my project, and there's this specific step that I've been stuck for hours... So I have a middleware setup to try and verify the access token ...
-2
votes
0
answers
14
views
Create custom img collage from uploaded photos [closed]
I wan to build custom image layout, where you upload image and the end result is collage. I dont really know where to start.
My idea is to create pre-defined grid, and to each square you can upload ...
-1
votes
0
answers
15
views
Combine arrays on update to Dynamo table - Cannot read properties of undefined (reading '0')
I have a DynamoDB table that is holding several pieces of data, of which one will be an array of objects.
I have a lambda that will handle another array of objects coming in that I am wanting to ...
-4
votes
0
answers
15
views
NO_RESULTS return from directionsService.route() [closed]
I'm currently using Google's Directions API, and I stumbled upon an issue.
For some reason, a lot of my calls to directionsService.route() to receive the duration of the itinerary seem to return ...
0
votes
0
answers
11
views
@iFrame-resizer/react implementation error - Uncaught SyntaxError: Unexpected token 's', "scroll-to-top" is not valid JSON
I am using the latest version of iframe-resizer/react for automatically adjusting the height and width of the iframe.
Whenever I'm reacting the content, I'm getting a runtime error stating -
VM2860:1 ...
0
votes
1
answer
26
views
The input in searchbar disappears when i click on any other space/part of the browser of when i click tab button
import React, { useState, useEffect, useRef } from "react";
import { useNavigate } from "react-router-dom";
import axios from "axios";
import Autocomplete from "@mui/...