Category "javascript"

How can I turn my navbar links into a dropdown menu with HTML CSS and JavaScript?

I am trying to turn the first two links of my navbar into dropdown menus. I want to make it so that when you click on them, the dropdown menu shows and the arro

How to make redux function call on radio button click react native?

I am working on project of Food app. I have preference screen where user can click on any desired preference to add in order. This is working but I want to disp

How do I render components with different layouts/elements using react-router-dom v6

I am having trouble writing code to render a login page with no navbar and sidebar. I have come across some pages that ask similar questions but none seem to pe

Using Websocket Channel in React

I am working on a project where I have to make an api call to a websocket, and display certain information based on that call. As you can see I have used the su

Edit value for a key in a Map in Angular

I have a model that uses a Map for eg: (I also have other properties such as Name) export class User { _id!: string; accounts!: Map<String,Number>

KnockoutJS - How to hide certain elements inside foreach using Observable Arrays?

I have a list of WebsiteOwners. I'm trying to build a UI which will display more information about the owners when I click on them. this.toExpand = ko.ob

Webpack Hot module replacement, react 18 ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before

I updated React to v18 and my Webpack dev server gives me a console error whenever the hot module replacement fires and injects the new javascript code: Warning

how can anyone send email to me on my website in js

I am creating a project as I have created a contact page. I want any user to send me a email by putting his email and message in input box of contact page. I ha

Error creating json file in node js

I have followed many solutions provided in the previous questions but mine is not working. The problem is in .json extension. Whenever I use filename.json, the

Fetch doesn't retrive data

I am currently building a login form which will be using a restAPI for the registration/Auth but I'm receiving a 401 error when using fetch to test the retrieve

How does one, from an array of objects, collect and aggregate the merged variant of all objects with a specific equal property value?

const portfolio = [ { name: 'Mark', stock: 'FB' }, { name: 'Steve', stock: 'AAPL' }, { name: 'Tim', stock: 'AAPL' }, { name: 'Steve', stock: 'MSFT' },

Trouble displaying geometries on leaflet.js map

I am attempting to load a very large geojson to a leaflet map. The map is written in a JavaScript script and is referenced by the HTML script as is outlined bel

Columns not stacking up with HighCharterR in the tooltip

I am trying to display a stacked Column Chart on tooltip (using HighCharter api in R). I was able to get a column chart displayed as the tooltip but the bars ar

React Antd: How to remove spacing between vertical divider and any content right next to it?

</div> <Divider type="vertical" style={{ width: "5px", height: "auto" , marginRight : '0px' , padding : '0 0'}} /> <div style={{ padding : '0 0'

Override Mantine styles to only one element

In my React project, I am using Mantine's library accordion in two different components: Search.jsx and Profile.jsx. The point is I need to accurately customize

const elements defined in js module - cant access as DOM content not loaded yet

Using the below example. The const element test_el is null because the DOM content isn't loaded yet. So test() raises an error. Wrapping the const definition in

Filter by date using React Hook

There are 2 methods of filter by date and by letters , they should work together and separately. 2.I thought I can combine them , but nothing happened and tried

Select2 doesn't automatically set selected value on CentOS 7

I have a select2 to display list of timezone and automatically set selected value, codes below works properly in development environment (ASP MVC Net Core 3.1),

Unable to publish scoped NPM package on internal Artifactory

i am trying to publish a simple (there is only a js file inside) scoped NPM package on my company's Artifactory. I followed all the documentation available both

React js ecommerce price change when size and material variants option selected

I am trying to get the final price in the productInfo page when the material and size variants options are selected. In the data.js: export const productItems =