Category "javascript"

Angular 10 - Not to trigger (click) function on dragging

I have a div with an openlayers map like this: <div id="map" (click)="getInfo($event)" class="map"></div> I use dragging with my mouse to navigat

Export without Render function in React Native

In my React Native application, i am trying to add a component where i'll perform some config tasks but that component won't render anything. I have made the co

I want to create a simple calculator in jQuery

Basically, I am trying to create a simple calculator in jQuery as I created first in javascript but have some confusion in jQuery functions. First here is my HT

React - Cannot read properties of undefined (reading 'pathname')

I don't understand why the error appears. My task is to make animation between Routes. Can you suggest where I made a mistake? enter image description here I us

node.js express req.body undefined

var express = require('express'); var app = express(); var PORT = 3000; const bodyParser = require('body-parser') app.use(bodyParser.json()) app.use(bodyPar

why is live-server injecting these javascript codes

I'm trying to create grid layout but live-server is injecting these codes in webpage... // <![CDATA[ <-- For SVG support if ('WebSocket' in window) { (

How can I load API before Website React Js? [closed]

When I open the site for the first time, it Loads before the API and when I Load it again, the data appears.enter image description here

Javascript - understanding recursive inner function

The following code prints the path of the key searched by its value inside an object: function findKeyPath(obj, keyAttr, keyValue) { let path = ""; (fu

How to set custoM marker returned by Mapbox.Geocoder

Taking my fists steps with MapboxGL.js I could add a control to use Geolocating and I would need some control over the marker that Geocoder put on map after a d

I'm using pure JavaScript but I continue to get errors that end with "is not a function". How do make it so I can detect words and reply accordingly?

I want to detect a specific word or multiple words within the user's entered text and reply accordingly. I plan to add more words to detect but for now I've bee

Is Svelte limited to single-page applications (SPA)?

The Svelte documentation states that: Svelte converts your app into ideal JavaScript at build time, rather than interpreting your application code at run time.

window.addEventListener('load',... not firing on Safari?

I need redirect page after it load and get param from URL. I can do by button click. But I want redirect page automatic (without user input). I am use window.ad

electron v10.1.1 gives Uncaught TypeError: Cannot read property 'dialog' of undefined, but same code works in electron v9.3.0

I am trying to upload a file in an electron app which works perfectly for electron v9.3.0 but as soon as I use electron v10.1.1, it gives the following error Un

JavaScript .focus() function not working in a text field

I'm trying to use .focus() on the following form field without success. The tabindex of the div this element is in is 0. <input class="form-control ng-pristi

Connecting to mongoDB(/mongoose) from a website?

I'm creating a website, and currently for a feature I need it to connect to my mongoDB database, is there any way to do this? As far as I've seen it's not possi

How to hide the three-dot dropdown menu on a Vega chart?

I have a simple chart embedded in my website. Using the vega-lite spec v5. Here's an example: The circle with three dots triggers a drop-down menu with some ac

html5 video dropdown quality hls.js

I'm use a tag html5 video + hls.js for video streaming .m3u8 <div class="container-video"> <video id="video" width="700"

How to clear rad listbox items from client side

I have a radlistbox i want clear the radlistbox items. i had tried this code but not working as expected.Can someone give me a idea how can i do this. Thanks.

Adding JS function to onClick event

I am currently trying to make three buttons that will call the same function, but will result with three different outcomes. This is what I have so far: html &l

Props are not passing from parent to child components in React Functional component

Hi developers I'm just a beginner in React.js. I tried to print props by passing from parent to child. This is app.js file import React from "react"; im