Category "javascript"

Handle currency format in grid columns value

I'm trying to handle some currency values in my grid (us dollar, euro, etc.) I find a way to set it up into my grid, using grid column template for now I have t

Fill bootstrap 5 modal with mysql record data using javascript fetch/ async/await with ES6 notation so as to update the record

All of this code works. It activates the BS5 modal and fills it with a record using a stored procedure on MySQL db. The issue was calling the wrong variable. If

Form input checkbox and file type isn't functioning

I'm trying to make a form for adding a blog page. I have title form, date form, content form, checkbox for blog category form and image form for the topic image

How to measure the height of a child and pass it to a parent in React?

I want to calculate the height of a component and send it to its parent when the page is loaded and resized. I'm using the below reusable Hook to successfully m

Regex for duplicate words in a string with one of them with a apostrophe in Angular

I want to create a regex for a requirement, a string is having duplicate words but in that duplicate words one is with a apostrophe. For example: EXCHANGE CORRE

Make standalone Checkbox filter - Mapbox

Fairly new to Mapbox but I have an issue with my code. With my link here (https://codepen.io/bearcats6001/project/editor/XjrPNP) I have a map that you have to p

Bar chart with two sets of labels in Quickchart

I am trying to create a bar chart for tracking a budget with quickchart. I want the chart to have one set of labels on top of the bars (for % remaining), and a

Create a new Date for any specific timezone

I am using Google Apps Script to check and re-format date data from some Google Sheets. But the problem is the result shows the times for the user who run the c

sort unique values on the same line

If I have a list of items like this in any text-area, I can use a bookmarklet to sort the unique values. a b d c c I click on the bookmarklet and the list is c

Integrate Phaser Game with React as component

I'm new to React, I want to make a component for my phaser game to insert it into a react project. My Game component: import React, { Component } from 'react' i

I want to highlight the Specific word in my ajax response loop

I want to highlight the word which user has searched. I am getting an array in response which will shows the occurrence of that word. I want to highlight that w

Check if two arrays have an object with the same property

Here's my goal: compare two objects and figure out if there is 1 or more items in common. If there are 1 or more in common, return true otherwise (no items in

Nested object needs to be modified

This is the input json which i am reading and trying to change the structure as per requirement .But unable to do so countries i am able to put inside object bu

Assign value only when key is a valid property of a type in TypeScript [duplicate]

I have a type, e.g.: type Output = { fieldA?: string; fieldB?: string; } And I have an object, e.g.: const input = { fieldA: "A", fie

How to prevent Jest from combining results?

I currently have two jest test cases the first one passes, but the second fails because its adding the sum of the previous case to that one test('Subtotal to be

What is the proper way to POST data using javascript fetch? [duplicate]

I am trying to get away from jQuery and start using promises and arrow functions. Try as I might, I can't seem to pass data to PHP using java

How To Find Out Where the Short URLs Point To with Javascript

I have created a short url, let say https://my.short.link/foo, that is pointing to https://my.other.website/bar. How can I retrieve this url with a javascript m

What is the function of this code in thumbnails: quot

What is the meaning of this code please? &quot;300:100&quot The code is in this line: <a expr:href='data:post.url'><img expr:alt='data:post.tit

How can I call a Powershell / Command Line Script using a BrowserAction in a FireFox WebExtension?

When the button is pressed, I want to get the URL from the current tab and pass it as an argument to the script. I know that I have to use browser.browserAction

Not able to Initialize Firebase APP inside script module in HTML

I am working on a minimal (proof of concept) project with Preact and Firebase. A single HTML file, bundler/transpiler free thanks to HTM as JSX replacement. Her