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
0
votes
1answer
3k 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 ...
2
votes
3answers
348 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. ...
5
votes
1answer
5k 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: ...
3
votes
1answer
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 ...
4
votes
1answer
147 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. ...
5
votes
3answers
207 views
4
votes
2answers
581 views

Click handlers for SVG polygons

How can I write this shorter? ...
7
votes
1answer
1k 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 ...
17
votes
2answers
28k 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 ...
3
votes
2answers
2k 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. ...
1
vote
2answers
1k 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 ...
5
votes
2answers
373 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 ...
5
votes
3answers
480 views

Similar event handlers for buttons

I have 3 simple similar event handler functions that I would like to refactor. Any suggestions? ...