Category "javascript"

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

Why does my D3 code break when I set the script type to module?

I am working on a project built with Javascrpt, jQuery, and Vite.js. My colleague built a data visualization using D3 - a US states map - that I need to implem

web3 JS payment button for Metamask BSC bep20 token

I would like to accept donations from visitors, I only want an specific token with pre set amount and only people with metamask. if (typeof window.ethereum !==

loop through array issue

I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never seen anything like it before

ffmpeg exited with code 1: Error reinitializing filters! Failed to inject frame into filter network: Invalid argument

Using video show npm I am creating a video from multiple images. initially there was an issue but then I download and installed ffmpeg. Now another error occurs

Highcharts.JS deleting data and freezing browser

I'm retrieving data from Firebase RealTime Database. I need to get the values in a chart so I decided to use highchart.js. Could someone please explain to me wh

MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 wont get fixed

I've been trying for over 2 hours now trying to figure out what's wrong with this database. I've tried everything. From reinstalling the server, restarting the

Syntax highlighting via Prism in Glorious Demo

So I found out about 'Glorious Demo' today, and I'm testing out a demo of it. After getting Glorious Demo to work initially, I tried adding syntax highlighting

What's the best way to manually save a webpage's html, so I can practice my parsing skills? (Right Clicking in Chrome isn't working)

I am just getting started on my first web scraping project. Before I go and install a headless browser etc, I thought I would just save the page manually and wo

Dropdown menu remain open after click and refresh

I have a problem on how to make my dropdown remain open after clicking and avoid closing after refresh. Here's what I've done. <button class="dropdown_btn"&g

How to make dynamic changes in HTML?

So I want to add to a variable every time someone clicks a button on my website. I am very new to HMTL so I don't know how to do this. All the examples I've goo

Front End First Timer: How do I modify Javascript to accomadate multiple image slides within multiple slides?

I have 0 experience in front end, but going for it anyway. I currently have this Javascript: <script> function openCity(evt, cityName) { //

Why the second image is not being dropped in the correct position in html and Javascipt?

I have the following code in which is implemented a simple drag and drop with an image. for some reason the first image works the second no, when I drug it insi

Getting image from input file and then add it as a background to a div

I am making a whack the mole game with Vanilla JS and I am trying to make the person whack whatever he wants by letting them upload an image by input file but

How to randomly simulate an array of records based on a representative record and property-specific generator functions?

When given a structure of one record, how can I randomly simulate n records of the same structure? Example Consider that I have an array of records such as: [

Highlight corresponding table <TD> cell based on row name and cell value

How would I go about highlighting a cell based on the row name and column value from the first column? I have included a fiddle. $('tr').each(function() {

Js await function inside a map

I have an array of category ids in order, I have to make a map and fetch the items from these categories and in the end keep the original order of the array wha

react native render error (view config getter callback for component 'div'?

I have a problem with react-native. I'm trying exercise to do todo app from how I watch on youtube lessons. Can't understand where is my fault? Youtuber instruc

Customize the default font family on Strapi V4 headless CMS?

How can I change the default font-family of the admin Strapi v4 dashboard? because I found nothing of how we can change the default Strapi v4 font-family

How to share functions and variables between one Javascript file that IS a module, and another Javascript file that is NOT a module

I have a project built using Javascript, jQuery, and Vite.js. I need to share functions and variables between one JS file that is a module, and another JS file