Alternating rows background - updating dynamically when hiding/showing rows with css only?

I have a table ".report" and it should have alternating background for its rows. The UI allows users to hide and show rows dynamically and I want the background of the rows to keep the pattern at all times. I implemented the solution whe

Continue reading →

How to send a json file using a telegram bot?

I am getting this error when using sendDocument: GrammyError: Call to 'sendDocument' failed! (400: Bad Request: invalid file HTTP URL specified: Wrong port number specified in the URL) Code: const file = await fs.createReadStr

Continue reading →

Checkbox Uncheck does not refresh table in Vue

I am using Daisy UI and simple VUE and working on a checkbox. When I check the checkbox it fitlers the table entries and works fine but when I uncheck or check another checkbox it does not refresh/filter again. The following is my table

Continue reading →

problem with audio player in HTML, JS, sound not playing

I wrote an audio player for my site using HTML+ JS, but it doesn't play the sound directly from a specific file, for some reason the player only plays the sound from this server "https://s3-us-west-2.amazonaws.com/s.cdpn.io/858/outfoxing

Continue reading →

Javascript: alias inside the object changes

function obj() {}; obj.prototype.custom = function () { this.custom.alias = this; this.check(); } obj.prototype.check = function () { console.log(this === this.custom.alias); } os = []; for (let i = 1; i

Continue reading →

Nextjs 3rd party redirect handle

Is that possible to handle POST incoming request in Nextjs application? I have some form what send data to 3rd party service, this service check data and if everything ok redirect user to some page on nextjs app. The problem is that serv

Continue reading →

Looking for JavaScript Library/Framework to Implement Dynamic Item Placement in Table View with Varying Column/Row Spans

I'm working on a project that requires creating a table view where users can insert items into cells with varying column spans and row spans. This functionality is crucial for a storage management application, where users need to place i

Continue reading →

cannot set properties in undefined setting

Why i am getting cannot set properties of undefined setting (background color) in JavaScript code. let btn = document.querySelector('button'); let h1 = document.querySelector('h1'); let h2 = document.querySelector('h2'); let p = document

Continue reading →

How to return data that was sent to me in the form of a callback?

I'm not entirely familiar with web development, so this might seem like a stupid question, but allow me to describe it. After the user has chosen what they want to purchase, an API call was made that generated a trans_id and redirected t

Continue reading →

How to make multiple animations trigger in sequence on the same element using JavaScript?

I'm new to JavaScript, and working on a startup application. I'm trying to write code that will cause an animation to execute multiple times (in sequence) on the same text element, with the text changing between animations. The text chan

Continue reading →

Why is toDataURL() returning blank image? (with p5 video)

I'm using p5 to display a video with the webcam and send a picture of it when the user clicks a button (along with lat & lon cords). For some reason though, toDataURL() always returns a blank image. Here's what I have: function setup() {

Continue reading →

Convert .xlsl to .json using JavaScript or Python

i have a table in the format --------Header-------- Name Subject Hours v1 v2 v3 v4 v5 v6 i want the json file to have this format: { { "Name": "v1", "Subject": "v2", "Hours": "v3" }, { "Name": "v4", "Subject": "v5", "

Continue reading →

How cobrowsing works?

I am trying to create a cobrowsing in-browser application from scratch. I am now dealing with sending data. I solved the communication between the two sides by using signalR, checking for changes on the side that sends the data using Mut

Continue reading →

How to convert img to Image component in next.js

I have implemented all the logic in this component. But it is according to the tag. Now, I want same logic to implement in the Image component. But doing so, it is giving me error. TypeError: Failed to construct 'Image': Please use the

Continue reading →

how to use buttons with the onClick method in the latest nextJS version 14.1.3

"use client" import React, { useState } from "react"; import { FaChevronLeft, FaChevronRight } from "react-icons/fa"; export default function HeroSlider() { const images = [ "/images/homepage/home-1.jpeg", "/images/homepage/ho

Continue reading →

Recharts - how to show multiple Y values at the same X

I am using Recharts (https://recharts.org/) for my charting purpose on a React Project. I have a dataset, to be charted as line chart where on the same "date" (i.e. X axis - Note: Date only, not date and time,) I can have multiple values

Continue reading →

How to set axios globally in Angular app/

I had in Vue.js axios config file: import axios from 'axios'; axios.defaults.baseURL = 'http://localhost:3000/api/v1'; so i didnt have to use URL in all the API request across the app. Now i created axios.ts file in Angular17 project i

Continue reading →

I am creating a popup that should display as soon as i open my splunk dashbaords... can anyone please help me on this issue ...?

The popup should just be visible as soon as the dashboard gets loaded ..I have tried using some JS query code for this one but I am not getting any results... I am expecting the pop to immediately launch after the dashbaord gets loaded .

Continue reading →

Why is my getAsFile() method returning null?

Here is my code: document.getElementById("Image_Panel").addEventListener('paste', (event) => { // Get the clipboard data console.log("Pasting an image step 1"); const clipboardData = event.clipboardData; // Check if the clipboard d

Continue reading →

Stuck on JavaScript logic for properly looping through JSON objects using fetch and modifying parameters

I have a JSON file with the following data: [ { "name": "Bitcoin (BTC)", "url": "https://openapiv1.coinstats.app/coins/bitcoin" , "quantity": .15 }, { "name": "Ethereum (ETH)", "url": "

Continue reading →