Category "javascript"

Vue 3 + Vite image URL becomes undefined after build

I encountered a bug where I dynamically generated a URL from props for image import in my Vue 3 component and it becomes undefined after build Script used to ge

Azure Functions bundle and extension, functions versions - javascript confusion 2.x, 5.0.x+?

I am making an azure cloudfunction with nodejs that gets triggered by a servicebus topic. Reading this I am super confused, they have a version for everything a

Navigation with arrow keys to the left does not work with input readOnly

I have built a table with 4 columns. 1 column is text and the other 3 are inputs that are set to readOnly. For this table I have written an arrowKeyCodeNavigati

How to change the iFrame src on click of a button

<section class="ep1"> <iframe src="https://example.com" width="640" height="480" allow="autoplay"></iframe> </section> <but

React setState resets string

I'm trying to get writed line from XTerm.js with a callback from parent element whenever user puts a new char to the terminal then parent element updates the st

Where does laravel gets the file name form a base64 decoded file

i have an file encoded in base64 and when i decode it and dump with dd() in laravel and it shows the file name and type so i was wondering where laravel stores

My .style.background doesn't style the item

I am trying to make a timer and make it so that when the time gets below 10 seconds the text turns red. I am using backgorund-clip to style my text, but for som

jwt.verify not throwing error for expired tokens

I'm using JWT - jsonwebtokens in Nodejs. I'm creating a token and want to throw an error if the token expires. My token is created successfully and I'm checking

copy text onclick from <p> tag

<div class="d-flex flex-row justify-content-between"> <p class="mb-0 me-1 py-2 ps-4 add-text" id=

Javascript functions stop working when using import at top of script, even without trying to use what's imported

I'm trying to recreate a simple program of mine using lit instead of just basic js, but adding import statements seems to break every function. Things seem to w

Create a date object in a specific time zone and convert it to UTC in JavaScript

My application is currently storing the date and time of a particular event in the following format: date: 2022-05-06 time: 00:00 // (12:00 AM) Each event's ti

How to determine the winner in a race?

I have created a program that places several nodes (which act as animals) on the screen; they're supposed to race eachother. Animal.js is the parent object of t

Merging values from an array of strings into a nested object in javascript

I want to merge values from an array into a static nested object. The array containing the values is something like this, ['name=ABC XYZ', 'hobbies=[M,N,O,P]',

Why does FormData appends extra empty arrays?

I am trying to upload multiple images via axios to backend server on a new application. It worked perfectly on my previous applications I have developed. When I

Merging values from an array of strings into a nested object in javascript

I want to merge values from an array into a static nested object. The array containing the values is something like this, ['name=ABC XYZ', 'hobbies=[M,N,O,P]',

Extract Color Matrices Used by Filter?

I am trying to detect the color matrix applied to a filtered image so that I can apply a reasonably close approximation of the filter using fabric. Does anyone

Request for JavaScript works, but not for GoogleScreen. What's the difference?

Please, help. I can't find the error and I don't understand why the request is not working. It seems to me that it's just Google's IP blocked by the site I'm ma

JavaScript can I directly access to a property inside a property in the object?

In this object, I want to print out an array in the form of [userName, skills]. I know that these objects don't have indexes. Is it possible to detect the skill

Ajax undefined value in PHP

When I call the function I always get an undefined value, I don't understand what can ruin it. You are logged in as undefined, Error undefined Ajax script: fu

Ajax undefined value in PHP

When I call the function I always get an undefined value, I don't understand what can ruin it. You are logged in as undefined, Error undefined Ajax script: fu