Category "javascript"

PHP email script is not working in gitlab

I developed one HTML site and for that, I but one PHP email script, and I submitted the form using ajax I uploaded the file into normal Cpanel and I test it's w

Bootstrap Modal inside a table populated from a partial

This is follow up question on this (Bootstrap Modal Confirmation using ASP.Net MVC and a table) Using MVC .NetCore, I populate a "partial" view and a Table (cal

Fill treeview from custom array of objects. Recursion call

I'm using treeview to display my hierarchical data. I have following array of objects: const data = [ { id: 1, hierarchyid: "/", level: 0, name: "Mhz" },

Can anyone explain why my JavaScript map function displays two extra posts upon page refresh? Getting weird duplicates with and without errors

Hello friendly people of stackoverflow, I'm having a map function issue and I just can't put my finger on what the problem could be. Context is just for user da

Alpine.js :class not working in second element

I'm starting to look into Alpine.js and trying to understand how it works. I have some html with one button to flip the background-color in two other buttons, b

Is it recommended to pass setters from useState as props?

I am currently in a coding bootcamp and the instructor told me that it is not best practice to pass the setters defined in my useState as props to children comp

window.postmessage() data is not recieved instantly rather than i have put a setTimeout function to pass the data

I am using window.postmessage() to send the data across domains to a popup but, postmessage is not sending the data instantly i.e. when captured on other domain

How to avoid duplicate JS code that each uses its own this? [duplicate]

I have several different classes with the same duplicate code. Aside from the different identity of each's this, these duplicate code are all

WalletConnectProvider not working with custom RPC

I want to connect custom RPC with WalletConnectProvider. But I keep getting an error of Uncaught Error: PollingBlockTracker - encountered and error. Here below

Convert HH:mm to UTC date time in JavaScript using date-fns

I'm working on an appointment booking React app where a teacher can set their virtual office hours in the form of a time slot. let availability = ["09:00", "17:

State is not Setting

I am trying to store the result of my backend, which is a list of inventories, sent from my backend powered by Microsoft .Net 6 Web API. But I can't figure out

hold an private array with module pattern js

I'm using module pattern on JS. Trying to make 2 private properties which first property will hold the number i.e 3. The second property is array of string whic

Incrementing a "PlayerID" with a MongoDB Atlas Trigger

I need to have a playerID that is separate from _id and increments with each new entry into my users collection. I have tried to follow this tutorial with no lu

Make the <a> tag open two URLs (in two different pages)

I wanted to make the tag open two URLs at the same time. This is what I tried: Only HTML <a href="URL1" target="_blank" onclick="window.open('URL2');">te

TypeError: x.include is not a function

I'm new on JS. In this code country is variable. Results can contain multiple answers at the same time 53,110,122 etc. And for example if I results have 68 I sh

How to change the style of an element retrieved from JS getelementbyid in react?

I'm trying to target an element in the the DOM that has already been returned, and rendered, by another component; I was hoping to use a getElementById() call,

Google sheets script - multiple sheets to pdf script

I have made a script that exports a certain sheet to a PDF. But at this moment we want to add a second sheet, so we need to export 2 sheets to a single PDF . An

I want to display fetched data from api in form columns (auto fill data) in React.js and Mysql

i am using onKeyUp event for fire api without submitting the form and i fetched data in response successfully if Mobile number matched. But i don't understand h

Change color of Pathlayer on Click, MapBox DeckGl React.js

I have a mapbox React.js component implemented with DeckGl I am trying to make my Pathlayer color changes on evenry mouse click (onClick), using onClick, getCol

Uncaught ReferenceError when deploying to Netlify

I have published a git repo (https://github.com/GeorgeFlorian/Forkify-App) to Netlify (https://forkify-jorje.netlify.app/) after following an Udemy tutorial: Ev