Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

-1 votes
0 answers
63 views

jQuery: onclick event works only the first time

Trying to add two event handlers on two elements respectively. The second element will only appear in DOM after users clicks the first element. My problem is the first event handler only work for one ...
Jane Lim's user avatar
-1 votes
1 answer
54 views

Calling Function from Click Event in Leaflet

I am hoping there are some Leaflet experts here who can explain what I'm missing in the code below. I am only a hobbyist programmer so I apologize if my terminology doesn't make complete sense. I was ...
mshamrock's user avatar
0 votes
0 answers
16 views

Facing issues with dropdown button in Flask

I am building a basic search page in Flask. When the page loads, I enter the search bar and get the results. Then when I click on the drop-down, I can only select 1st option, "Organization" &...
Viraj Rathod's user avatar
0 votes
1 answer
64 views

How to get status by add rows dynamic in javascript

I want ask about rows dynamic in javascript. I should input the value into field result, and then the field status will automation fill pass or fail. But when I added the second rows, I can input the ...
Ayu Asri Lestari's user avatar
0 votes
0 answers
17 views

Event Handler not fired in AngularJS

I have 2 directives in AngularJS app., and I have a button to open a popup modal in a directive, so I fire event when the button clicked to run a function from the other directive. the issue is the ...
Amr Elnashar's user avatar
  • 1,769
0 votes
2 answers
63 views

When I submit my form, it refreshes, overriding my preventdefault() method. I can't fix it

I initially had it working, but when I added the dark mode toggle, it began to read the dark mode toggle as a submit event, and would change the colour of the beer bottle and display the enter/Don't ...
davelangham's user avatar
1 vote
4 answers
283 views

How can I remove the event listeners from within a javascript class?

I already saw this thread, but I think my case is a bit different. This is an example class, whose constructor receives an element as parameter, that can be moved dragging it. But it does not stop ...
anvalon's user avatar
  • 41
2 votes
1 answer
379 views

Add different sounds to different buttons

I am working through a project using Javascript and jQuery. The projects requires me to add sounds to buttons. A different sound should play depending on the button I click. I know how to add a single ...
Leslie W.'s user avatar
1 vote
0 answers
23 views

what is the best jsript event handler to use when data is change through other script for select? [duplicate]

I am trying to make, the value for the value media and unit media, change when the object is select, yes the object do change when I change upon the available item to select, but my target is to ...
Muhammad Faiz Abdullah's user avatar
2 votes
1 answer
265 views

Serialising an HTML element that has event handlers

I am currently making a website for a class that I am in. It is supposed to be a store, made in Pure HTML, CSS, and JavaScript (no libraries including jQuery). I am currently attempting at making a ...
highjeans 's user avatar
-1 votes
2 answers
133 views

How to fix a Function for Button click event executes on page load [closed]

In my MERN app I am trying to take a screenshot of a portion of the webpage to send it to the database with other info that is submitted such as submitter and description. The problem is, the image is ...
Steve's user avatar
  • 45
1 vote
1 answer
137 views

eventHandler trigger multiple times when using .on() only

function changeStatus() { $('#dataTable tbody').on('change', '.orderStatus', function () {..code} } function showOrdersInModal() { $('#dataTable tbody').on('click', '.fa-eye-btn', function (e) ...
Shinxx's user avatar
  • 47
-1 votes
2 answers
122 views

How to write Java Script arrow functions in regular function syntax?

I need help to rewrite some arrow functions to regular functions but right now my brain is totally stucked, I have some example code here from a rock paper scissors game I got from kyle, how would it ...
Peterman's user avatar
3 votes
2 answers
3k views

How do I set the correct type for a click handler when using Svelte with TypeScript?

I am using Svelte with TypeScript. I have a button: <button on:click|preventDefault={clickHandler}> Click me </button> I am trying to set the correct type for the click handler. export ...
mikemaccana's user avatar
0 votes
0 answers
175 views

Assigning event handler with arguments to events using arrow functions

In the below snippet,during a click event, the arrow function gets called. Now, this arrow function in turn runs the code in its body. Now since callme() is a single line statement, so it should ...
zangetsu's user avatar

15 30 50 per page
1
2 3 4 5
11