Quantcast
Channel: Active questions tagged javascript - Stack Overflow

Manually generate GA linker parameter with gtag (GA4)

BackgroundTo pass a client_id from one domain to another, Google supports adding a "linker" parameter to outgoing Links that are part of the cross-domain tracking setup. This linker parameter contains...

View Article


How does Google hide HTML source of search results?

When you try to view the source code of a Google search results page you just see a bunch of javascript code instead of readable text. How does Google do that?I have searched through the web but...

View Article


Image may be NSFW.
Clik here to view.

Why is the centering of my map off in my jQuery Mobile / Google Maps API3...

I have a map powered by Google Maps Javascript API3 in my jQuery Mobile web application. I added a circle with black borders on it.On one page of my app with the map directly, the map is centered...

View Article

TypeError: Cannot read property "1" from undefined

I have some very simple code that is triggered by a google form that asks for 2 email addresses. The code works fine when the email address is hardcoded (see commented email below) but when I try and...

View Article

Change Video on Scroll

I have taken the source code from this codepen page. It changes the image on scroll, but instead of image, I want to change the video on scroll.Here is the code I have so far. The first video plays but...

View Article


MediaSource reinitialization issue in audio buffer

I am providing the binary data and on frontend it is making it as a buffer and passing it to the MediaSoruce.addEventListererit is getting the data, but it is not appending it as I cannot hear to the...

View Article

Image may be NSFW.
Clik here to view.

Read cookies sent by server when using POST request for login

I am doing a POST request for login, when logged in the server sends a header "Set-Cookie" which I have to get it and put it in the browser. I tried all those methods none have...

View Article

How to fix cannot read properties of null (reading 'useContext')?

I can't find where the culprit is. I tried to debug it, but can't found what really make it those error:cannot read properties of null (reading 'useContext') &&react.development.js:209 Warning:...

View Article


What is the best way to encrypt login details (username and password) of any...

What is the best way to encrypt the login details (username and password) of any web based application using JavaScript at client side? My requirement is to encrypt the username and password of the...

View Article


Storybook/react/webpack5 unable to index

I have a project (node 24, react16, webpack5 & babel )and I'm trying to integrate it with storybook9; when I run the script npm run storybookIt throws:...Unable to index...

View Article

array.filter not returning array on click

i am trying to filter() an array using buttons instead of using an input fields when i use console.log() it return the information i want but when i use return nothing is happeningmy array looks...

View Article

chrome.history.search startTime + endTime

can I mix startTime and endTime in chrome.history.search query?so that I can limit results for eg. yesterday?this code gives me weird results (too many) chrome.history.search({text:'', startTime: a,...

View Article

Puppeteer-extra, TimeoutError doesn't seem to exist

This is a followup question to this one, which resolves a missing definition of TimeoutError in my puppeteer code. Thing is, I want to use puppeteer-extra, and despite being a lightweight wrapper for...

View Article


How do I check if collection exist in firestore (not document) in JS

Hoi, I would like to check, using React javascript, if a collection in the Firestore already exists, no matter if it's empty or not. I tried:if (collection(db, ref)) // is always true somehowAny ideas?...

View Article

Nodejs request issue with especific endpoint (Client network socket...

This is my entire codeconst rp = require('request-promise');(async () => { const headers = { Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Encoding': 'gzip,...

View Article


How to query a remote sqlserver? [closed]

I have published a web api querying a SqlServer Express edition.a) I have tested this web api by entering the GET request: http://apiweb.com:5283/api/product in a browser, I get the JSON result ; all...

View Article

Create a Seekbar like vimeo video player (HTML5)

I tried to create a HTML5 video player from scratch. But I couldn't create a seekbar that slide nicely like vimeo(or youtube). What I did is I added a extra div/span(that highlights the total viewed...

View Article


Is there a concrete date when event.getDefaultPrevented() will be removed?

I have a large project with more than 1 million LOC, and I'm trying to prioritize the conversion from getDefaultPrevented to defaultPrevented. I noticed that it has been deprecated several years and am...

View Article

Get message manager of a tab? (Firefox Add-on SDK)

It is a Firefox add-on SDK.I want to load a frame script to a given browser tab (complying with e10s).Currently I try to do this for every tab (just for testing), but message manager is undefined....

View Article

Get nsIDOMWindow of a Tab to do Text Input

Is it possible to use Text Input Processor on a specific Tab of a Firefox window?Do all the tabs share the same nsIDOMWindow object? If so, then is there any other solution?Rephrasing my problem: I...

View Article

XMLHttpRequest to ReqRes API returns 401 Unauthorized despite correct GET URL"

I'm trying to fetch user data from the ReqRes API using plain JavaScript and XMLHttpRequest inside a basic HTML file. The API is public and should not require authentication for a simple GET...

View Article


Declaring state outside of a functional component

Is that a valid approach to move state logic out of function component code like this?import { createStore } from 'solid-js/store'const [user, setUser] = createStore( {name: 'Alice', params: {age:...

View Article


How to receive image file to API server (Node.js)

I want to build API server by node.js,and I want to post image file to my API server.I was able to write GET method logic in my codebut, I have no idea write POST method logic.Please help me.↓My code...

View Article

Image may be NSFW.
Clik here to view.

Expand Searchbar with Search icon as well as show close icon onclick using...

I am trying to open the expanded search bar with a search icon as well as a close icon on click using javascript. Here I am attaching my code. Your help will be appreciated in advance. I am also...

View Article

How do I declare a test once and use it many times?

I have a number of common tests which I'd like to be able define once and use many times, in various combinations in order to test different workflows. Ideally I'd put these in a library and import...

View Article


In Angular 19, on keydown event,Spacebar is not getting ignored

I am using Angular 19 keydown event on Textbox. It should allow only numbers and decimals up to 2 places. Valid numbers are: 123.45, 675.1, 12345 etc.This works properly for all keys except Spacebar....

View Article

Math challenge: get the next largest number that is a permutation of the same...

I am trying to solve this challenge:Have the function nextLargest(num) take the num parameter being passed and return the next number greater than num using the same digits. For example: if num is 123...

View Article

React + Redux - Input onChange is very slow when typing in when the input...

I got my input who is filled by a value from my state.<input id="flashVars" name="flashVars" type="text" value={settings.flashVarsValue} disabled={isDisabled} onChange={handleChange} />Settingsis...

View Article

React slow with multiple controlled text inputs

I have a form with multiple text inputs. I have them all set up as controlled inputs. When typing, there is a lag of up to several seconds for the new text to display in the field. Here is an example...

View Article



How to reduce delay while typing in text field in react-redux

// InputField.jsximport React from 'react'import { useDispatch } from 'react-redux'import { setValue } from '../action/setValue.action'import { Form, FormItem, FormInput } from 'react-blueprint'export...

View Article


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