Skip to main content

Questions tagged [event-handling]

Event handling is a coding pattern related to acting on messages between a source and one or more subscribers. A point listener in the source provides a way in which subscribed code can consume messages raised from the source.

Filter by
Sorted by
Tagged with
4 votes
2 answers
281 views

Handling a dragging gesture using jQuery

I'm not sure if this is the right way to do this, but I want to simply this script and hopefully use CSS3 animations. The code is really large, and parts are very irrelevant, so I'm wondering if I ...
Charlie's user avatar
  • 786
3 votes
3 answers
13k views

Simplifying multiple mouseover and mouseout functions

I am trying to hide and show tooltips depending on what element is hovered over. This works as expected and I could continue to rinse and repeat. However, I am wondering if there is a good way to ...
khollenbeck's user avatar
4 votes
1 answer
900 views

Cross-browser double form submit prevention

We developed a potential solution for the double form submit prevention and we need some review on it. To be able to execute this code on asp.net we needed to add our function call directly into the <...
sebascomeau's user avatar
0 votes
1 answer
5k views

Change URL on select change

I've made a method, which inserts a new query parameter, when the value of a select changes, then reloads the page. I've had enough of URL jQuery hax, so I figured it would be a great idea to put the ...
Nix's user avatar
  • 101
2 votes
3 answers
808 views

Options with a "yes" or "no" radio button

I have about 6 of these, but I'm only posting two. Essentially I have a bunch of options with a "yes" or "no" radio button. If "no" is selected, I want a form to popup. ...
RJP's user avatar
  • 143
5 votes
1 answer
6k views

Remove an event listener after firing once or any number of times

Remove an event listener after firing once or any number of times This is what I have: ...
XP1's user avatar
  • 151
3 votes
1 answer
2k views

Keeping UI responsive while performing long running task

I recently asked for some advice on the best way to structure my code for a program I was writing. (see this question on Programmers.SE). The solution I was given was quite elegant, however I am less ...
Stuart Leyland-Cole's user avatar
5 votes
1 answer
159 views

Altering contents when loading iframes

I am quite new to JavaScript and I wonder if you experts can see any obvious mistakes in this working code, and if any, suggest good improvements. ...
Hakan's user avatar
  • 317
5 votes
3 answers
223 views

Mouseover effects for five buttons which may be enabled or disabled

...
David's user avatar
  • 51
4 votes
2 answers
1k views

Click handlers for SVG polygons

How can I write this shorter? ...
gidzior's user avatar
  • 277
7 votes
1 answer
2k views

Even handler for text input preview

In a WPF application I have the following event handler for PreviewTextInput event in ComboBox control. The main purpose of this ...
Sergey K's user avatar
  • 385
18 votes
2 answers
30k views

Generic EventArgs to go with generic EventHandler?

There is as of .NET 2.0 a generic EventHandler delegate type, which can be used to define an event in terms of the EventArgs ...
KeithS's user avatar
  • 1,705
3 votes
2 answers
4k views

Mouseover effect for radio buttons

I'm very much a beginner and have put together some JavaScript to control a pair of radio buttons which essentially behave as links. I'm doing this as sort of a self-initiated project, or bit of fun. ...
jakry001's user avatar
1 vote
2 answers
2k views

DataTables search filter handler

I am writing a JavaScript feature where by I need to make a call to a third-party library (pre-1.10 DataTables) depending upon whether or not the user provides an integer as an input to the function ...
Chantz's user avatar
  • 213
6 votes
2 answers
419 views

Window-scrolling controller

I generally feel that the pattern I use for development is kind of wrong. I start with simple functionality, then when I realize that some pieces can be reused I usually start to write "scope root ...
Misha Reyzlin's user avatar
5 votes
3 answers
498 views

Similar event handlers for buttons

I have 3 simple similar event handler functions that I would like to refactor. Any suggestions? ...
thedev's user avatar
  • 827
13 votes
2 answers
837 views

Setting up radio button click ActionListeners

Instead of writing four almost identical setOnClickListener method calls, I opted to iterate over an array, but I'm wondering if this was the best way to do it. Do ...
user avatar

1
6 7 8 9
10