Category "javascript"

How to define accountName The resource name of the account that owns the collection of ad clients

I'm trying to use Adsense management API in Google Sheets using apps script which runs with javascript. I'm unable to define "accountName " even knowing "This s

Why addEventListener to 'select' element don not work?

I want select to another option ,it will console.log 2222 in Console,but when I choose to another,it don't console, so why? let mySelect = document.getElem

C# WEB API CORS does not work

Fighting with CORS. I have a site that is making a simple XmlHttpRequest to a WEB API I built in C#. var xhr = new XMLHttpRequest(); xhr.open("GET","h

next.js iron-session req.session.user is undefined

I'm making a dashboard for my team's bot using next.js and iron-session. However, when I save the session and check it, req.session.user is undefined. How can I

HTML can't properly read unicode in image tag src

I am using electron with html, css and js. For my desktop app, I want to import an image from my local storage using an img tag. However, my file name contains

How to reduce bundle size of first load page in Next.js? [duplicate]

I have a very big bundle size of one of my pages. How can I improve the first loading of the page in Next.js? Pls take a look on screenshot

jQuery Timeout Function not working

I am working on a currently working on a dropdown menu using jQuery. I have run into an issue where the Timeout function is not working at all. The code for it

How to find frequency count of a word in a html table column and write output in a text file?

I am trying to get the frequency of each word of column 'Company Registered District' in the following table in the screenshot. I tried this post (how to find h

access web serial api in android chrome browser

using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or rece

rtl in material UI cause ruined my app appearance

I setup my rtl configuration step by step in v5mui. Using: emotion as styled-engine stylis v4 stylis-plugin-rtl v2 Every thing is OK but when using some complic

How to display 2 values on leaflet control search result(tooltip)

i'm using leaflet-control-search to search for markers.http://labs.easyblog.it/maps/leaflet-search/examples/outside.html markers are stored in json like this [

JS, Connect <h1> with <title>

All I want to do is to make the title the exact same as the h1 tag. <title class="blogtitle"></title> <h1 class="title">Updating our staff mem

ReactJS reduce image file size without losing aspect ratio after user selects it in an input

I've been searching everywhere without luck. A simple way to reduce the width of an image picked with a simple <input type="file" /> without it losing it

How to prevent HTML forms being sent multiple times in a row within a short time period?

I'm using this simple form to implement a login: <form action="/handleLogin/" name="login" method="post"> <div> <label for="userid"&

Getting All Elements In An Array (Javascript)

I am trying to check if a string contains certain words which I had stored in an array... however I'm new to JS, so I don't exactly know how to check all of the

What is the best practice of streaming JSON objects in Nodejs, if it is bigger than 10M and split it into multiple streams?

I have a JSON object, it is a big object. I need to send (write) it as a Kafka message and it takes a lot of time. I need a mechanism to stream the JSON object

How to use installed version of chrome in Playwright?

I want to use chrome instead of chromium. I can achieve the same in puppeteer by providing executable path. In playwright it doesn't work as browser type argume

Boolean toggle for class method

I know there are similar questions but they do not provide the answer I am looking for. So what I'm trying to do is create a method that will toggle a boolean v

DMing a specific user with ID

I went through other questions trying to find the answer to this and came to the following code: let Prayer = message.member.user.tag; bot.users.cache.get("my_

Express module.js:550 throw err; ^ Cannot find module

I'm trying to initialize a simple express app with the following code: const express = require('express'); const app = express() const bodyParser = require('bo