Category "javascript"

How to use any icons with Nuxt3?

I'm facing an error with Nuxtjs when I try to use the vue-fontawesome framework and also the @nuxtjs/fontawesome framework, this is the error: [nuxt] [request e

I am locked zoomed out in date picker

I actually tried to restrict users to pick dates within 2 years from today in Datepicker. So now there is one issue that is coming up that when in zoom out too

ReferenceError: Cannot access 'Block' before initialization

I'm writing some js code for doing tetris for a school project, and I got stuck with a class I wrote. This is the code: let canvas = document.getElementById

how to reset the phone number text field when you change the country code

in react phone input one property is there international that helps but in react phone input 2 this property is not working. In the react phone input 2 if you w

Close hamburger menu when click on anchor links on same page (in mobile view)

I use this HTML, CSS and Javascript hamburger menu code: In the mobile view, it doesn't close the menu for me when I click on one of the other menus on the left

ASP.NET Web API return excel file to client

I have C# api code as below. It work correct when i run on visual studio and deploy to iis server. I consume this api by javascript or Angualar on production Fr

Memory considerations or risks to a very long (once per day) debounced function in JavaScript

I'm wondering if there are any possible risks or memory considerations to using a debounce (in our case, Lodash's implementation: https://github.com/lodash/loda

React Final Form - Double conditional Form

I have started to work on a form project using React final form, but I am struggling to do a two condition question. Would anyone knows how to do a double condi

Javascript visiblity toggle with onscroll

var headPos = window.scrollY; window.onscroll = function(){ headPos = window.scrollY; } window.onscroll = visi; function visi(){ if(headPos < 1300)

HTML : why doesn't drag events work in android?

I have a project that uses ondrag events(like ondragover and ondragend) but these events doesnt fired in android.i converted html to apk with Website 2 apk buil

NuxtJs Url changes but page no

The NuxtJs app works well with javascript enabled in the localhost and in the server, but I am trying to make it work with Javascript disabled. I switch to SSR

How to override the existing onclick() methods of html anchor tags

In a HTML page there are couple of anchor tags with onclick() methods - of which codes I cannot or must not change. However, I can add a new js file or jQuery t

How to set the legend area in a two-column fashion in Apache Echarts

I want to set the legend area in a two-column fashion in Apache Echarts, how I can achieve this with legend options? I'm not able to find any example related to

Referencing jQuery library on Google APIs and Relative path

In my Asp.Net Web Application, I have given a reference to jQuery library on Google APIs as below: <script src="https://ajax.googleapis.com/ajax/libs/jquery/

How to stop lightbox automatically submitting form

Currently the lightbox is made with .modal, this is how it should work: while submitting the form, the lightbox appears with a button asking for a higher purcha

How to create Line string in google Maps like Here Maps?

this code is to create linestring in Here Maps, I tried to find the same thing in google maps but I couldn't this.GetCoordinates = function (polyPoints) {

How do I record musical notes as they are played with the Web Audio and Media Recorder api's?

I'm trying to create a little app that records sounds from audio nodes as they are played using the Web Audio API, but have run into a few problems. I have two

How to implement unsigned right shift for BigInt in JavaScript?

I tried this sort of implementation, but it doesn't appear to be working. function urs32(n, amount) { const mask = (1 << (32 - amount)) - 1 return

Keep selected theme on page refresh using HTML, CSS and JavaScript

I would like to keep the selected theme when refreshing the page as well as across all other pages. I've seen other examples but I don't know how to implement i

Unexpected Jest Errors when Mocking Uppy

I'm attempting to mock the Uppy class from the uppy package in a Jest unit test following guidance from this previously answered question. My failing code is be