events

Why is there a large gap between Begin PreRenderComplete and End PreRenderComplete events?

I'd like to know what can cause this kind of disparity between the begin and end PreRendercomplete events or how I migh go about locating the bottleneck. aspx.page End PreRender 0.193179639923915 0.001543 aspx.page Begin PreRenderComplete 0.193206263076064 0.000027 aspx.page End PreRenderComplete 1.96926008935549 1.7760...

Android Custom View to Activity communication

I have a custom control/view that observes the direction of a gesture within its bounds. I would like to send a different message back to the Activity hosting the View depending on the direction of the gesture. I'm having a hard time determine what the right way to do this is. I would think I could raise a custom event in the control and...

Event problems with FF

Hi all :) Made this sweet little script to auto change fields after input. Works nicely in IE, Chrome and Safari, but not in FF or opera. JS code: function fieldChange(id, e){ var keyID = (window.event) ? event.keyCode : e.keyCode; if (document.getElementById(id).value.length >= 2){ ...

Click in a ListView item changes status of elements inside the item?

Hi, I don't know exactly how to explain this problem, but I'll try. I have a ListView with several items. Each item has inside a TextView and two ImageView. I want the ImageView change when I click on them, and I want to open a context menu when I press for a long time into the ListView item. For the ImageView, everything works proper...

KeyUp event works in first winform, but not in second, why?

I have a winform program where I am trying to include PF functionality in tandem with button/mouse-click functionality. On the first screen that opens in the application, the keyup event works. I changed the KeyPreview property to True and wrote the following code: Private Sub Vehicle_KeyUp(ByVal sender As Object, ByVal e As System....

how to re-enable default after doing event.preventDefault()

Hi, I know this exact question was asked here, but the answer didn't work for what I needed to do so I figured I'd give some example code and explain a bit... $(document).keypress( function (event) { // Pressing Up or Right: Advance to next video if (event.keyCode == 40 || event.keyCode == 39) { event.pr...

Intercept paste event on HtmlEditor WinForms

Hi I'm using a HtmlEditor control inside a Windows Form. I got the control from this page: http://windowsclient.net/articles/htmleditor.aspx I want to extend the controls functionality by allowing the user to paste images from the clipboard. Right now you can paste plain and formatted text, but when trying to paste an image it does n...

Problem with multiple event handling in JQuery

Hi everyone, I have a strange jquery problem with multiple event handlers. What I'm trying to achieve is this: User selects some text on the page If the selection is not empty - show a context menu If user clicks somewhere else - the context menu should disappear I'm having troubles with the above i.e. sometimes the context menu a...

GWT removeHandler on first event notification

I want to remove a GWT event handler the first time I receive an event. I also want to avoid polluting my class with tracking registration objects that aren't really necessary. I currently have it coded as: final HandlerRegistration[] registrationRef = new HandlerRegistration[1]; registrationRef[0] = dialog.addFooHandler(new FooHandler(...

html body gwt click event

html file has two textbox and one button. but i need to generate click event when i only click outside of the two textboxes and button element.how can i do that. RootPanel.get().addEventListener or something like that?? help. ...

Prototype function to set onclick event observer in checkboxes

Hi, I want to set an observer for each of the following checkboxes: <div id="listr"> <ul id="lr" style="list-style-type: none"> <p class="tir">Text 1</p> <li class="ro"><input type="checkbox" name="r1" id="r1"/>A1</li> <li class="ro"><input type="checkbox" name="r2" />A2</li> <p class="tir">Text 2</p> <li class="ru...

How to add JavaScript event to textarea without having direct access to it?

Hi! I'm wondering how to add onblur="hcb.watermark.blur(event)" onfocus="hcb.watermark.focus(event)" style="color: rgb(136, 136, 136); to the following textarea without having direct access to it: <textarea rows="4" id="HCB_textarea" name="content" class="commentbox hcb-shadow-r" onkeypress="hcb.delta(event)"/> Could some additiona...

How to get proper value of .contentHeight after scaling? content of s:Group

<?xml version="1.0" encoding="utf-8"?> <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="creationCompleteHandler(event)" xmlns:mx="library://ns.adobe.com/flex/mx" mouseWheel="mouseWheelHandler(event)" backgroundAlpha="0" width="100%" ...

jquery fullcalendar - viewDisplay to pass selected month to events (reload events per month)

Hi, How can I pass the selected month from viewDisplay to the events function (which is a php call to the DB to load the events)? Only events for one month should get loaded at a time, but I'm afraid of what might happen if the user decides to click 'next' multiple times really quickly... My other option is to load 6 months forward and ...

How to defer execution of an Event on each item in a collection until iteration of collection is complete using delegates and/or events?

Of Note: This is more of a curiosity question than anything else. Given a List<Window> where each window has an event attached to the Close Event which removes the window from the collection, how could you use delegates / events to defer the execution of the Close Event until the collection has been iterated? For example: public class...

Java SWT: apply key events from List to Text field

I am making a component in SWT that contains a text field and a list. Whenever text is entered it filters the list. So far everything is working great and I am just trying to add some nice usability features. What I want to do is listen for any key events in the List field, if it is Enter that is pressed I perform the 'ok' action (alr...

Silverlight handling multiple key press combinations.

I have a Silverlight application in which I catch certain key presses such as TAB or CTRL to perform some action. However, I want to be able to handle multiple keys pressed at the same time such as CTRL + R or something like that. Is there any way to do that in Silverlight, and if so, how? Thank you in advance. ...

Why should I implement all event-handling methods, while handling events in a subclass of UIView?

According to the iPhone Application Programming Guide (Event-Handling chapter) I should implement all event-handling methods (even if it is a null implementation), if I work with UIView or UIViewController. And I shouldn't call the superclass implementation of these methods. Why? (I've searched in the Guide and in Google, but can't find...

Better way to kill a Form after the FormClosing event is overridden to hide rather than close?

I have a simple Windows Form that hosts property controls at runtime. When the user clicks Close [X] I want to keep the window and its contents alive rather than killing it by handling the FormClosing event, canceling the event and simply hiding the form. That's fine but at close of the application I need to actually close the window. ...

Inspect attached event handlers for any DOM element

Is there any way to view what functions / code are attached to any event for a DOM element? Using Firebug or any other tool. ...